Problem with running php script using mysql on tomcat

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-04-27T09:32:48Z Indexed on 2010/04/27 11:13 UTC
Read the original article Hit count: 431

Filed under:

I am using tomcat 6 with JavaBridge. I have stored my php script in the following location.

C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php

In test.php I am using curl and mysql. The php.ini in JavaBridge is stored in the following location

C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\php.ini 

and its contents are -

extension_dir="C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\x86-windows\ext"
include_path="C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\pear;."

there is also a config file called mysql.ini whose contents are -

extension = php_mysql.dll

I had also installed wamp earlier so I copied all the dll's from C:\wamp\bin\php\php5.3.0\ext to C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\x86-windows\ext

When I start tomcat and run my script I get the following error -

Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php on line 534

Please help.

© Stack Overflow or respective owner

Problem with running php script using mysql on tomcat

Posted by Peter on Super User See other posts from Super User or by Peter
Published on 2010-04-27T10:32:40Z Indexed on 2010/04/27 10:33 UTC
Read the original article Hit count: 431

Filed under:
|

I am using tomcat 6 with JavaBridge. I have stored my php script in the following location.

C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php

In test.php I am using curl and mysql. The php.ini in JavaBridge is stored in the following location

C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\php.ini 

and its contents are -

extension_dir="C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\x86-windows\ext"
include_path="C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\pear;."

there is also a config file called mysql.ini whose contents are -

extension = php_mysql.dll

I had also installed wamp earlier so I copied all the dll's from C:\wamp\bin\php\php5.3.0\ext to C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi\x86-windows\ext

When I start tomcat and run my script I get the following error -

Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php on line 534

Please help.

© Super User or respective owner

Related posts about php