mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Better error reporting when dll/shared library is not able to be loaded.
Submitted by: Bård Farstad <bf@ez.no>
This commit is contained in:
parent
1f793fd06c
commit
d93732179b
@ -29,6 +29,13 @@
|
||||
#include "php_ini.h"
|
||||
#include "php_globals.h"
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#include "win32/winutil.h"
|
||||
#define DL_ERROR php_win_err()
|
||||
#else
|
||||
#define DL_ERROR dlerror()
|
||||
#endif
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -185,7 +192,8 @@ static int jvm_create() {
|
||||
dl_handle = DL_LOAD(javalib);
|
||||
|
||||
if (!dl_handle) {
|
||||
php_error(E_ERROR, "Unable to load Java Library %s", javalib);
|
||||
php_error(E_ERROR, "Unable to load Java Library %s, error: %s",
|
||||
javalib, DL_ERROR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -150,6 +150,10 @@ LINK32=link.exe
|
||||
|
||||
SOURCE=.\java.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\..\..\win32\winutil.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
|
@ -29,6 +29,13 @@
|
||||
#include "php_ini.h"
|
||||
#include "php_globals.h"
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#include "win32/winutil.h"
|
||||
#define DL_ERROR php_win_err()
|
||||
#else
|
||||
#define DL_ERROR dlerror()
|
||||
#endif
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -185,7 +192,8 @@ static int jvm_create() {
|
||||
dl_handle = DL_LOAD(javalib);
|
||||
|
||||
if (!dl_handle) {
|
||||
php_error(E_ERROR, "Unable to load Java Library %s", javalib);
|
||||
php_error(E_ERROR, "Unable to load Java Library %s, error: %s",
|
||||
javalib, DL_ERROR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -150,6 +150,10 @@ LINK32=link.exe
|
||||
|
||||
SOURCE=.\java.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\..\..\win32\winutil.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
|
@ -154,6 +154,10 @@ SOURCE=..\..\ext\java\java.c
|
||||
|
||||
SOURCE=.\servlet.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\..\..\win32\winutil.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user