Hi,
> i have successfully installed javaBridge, test.php is returning correctly,
>
> however when i modify cgi/php.ini, and add
>
> extension=php_mysql.dll
>
> i get
> php.java.servlet.fastcgi.ConnectionException
the ConnectionException means that your extension version has crashed
the PHP.
Unlike the Unix/Linux ELF format, Windows DLL's don't have a binary
signature, so that a windows DLL which has been compiled against a
different ABI version may crash an executable.
You need to copy the correct DLL version to the PHP extension dir.
> is there any documentation on how to add extensions?
Please take a look at the phpinfo() output, see
http://localhost:8080/JavaBridge/test.php
PHP Version 5.3.1
Configure Command [...]
Compiler MSVC6 (Visual C++ 6.0)
Architecture x86
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\glassfishv3\glassfish\domains\domain1\applications\JavaBridge\WEB-INF\cgi\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,TS,VC6
PHP Extension Build API20090626,TS,VC6
Debug Build no
Thread Safety enabled
extension_dir C:\glassfishv3\glassfish\domains\domain1\applications
\JavaBridge\WEB-INF\cgi
The important variables are the "PHP version", the "compiler", the
"architecture", and whether or not "Thread Safety" is enabled.
For example my JEE server is running PHP 5.3.1 for x86, compiled with
VC6, TS enabled. So I have downloaded the PHP 5.3.1/VC 6/TS zip file and
copied the php_mysql.dll and a php.ini to the WEB-INF/cgi directory from
my JavaBridge.war, and re-deployed it.
After that I could see the php_mysql.dll in the phpinfo() page and I was
able to connect to a mysql database server.
Please see the PHP documentation at php.net for details.
Regards,
Jost Bökemeier
|