tags:

views:

61

answers:

2

I am using Tomcat 6. I am running a php script using the JavaBridge. I get the following error when I run my code.

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

Please help.

+1  A: 

I would do two things:

  • Make sure that location of php_mysql.dll is included in the PATH env variable.
  • Open your php.ini file, and look under the extensions. Make sure that the line for loading php_mysql.dll is not commented (make sure there isn't a ; in front of it).
codaddict
@unicornaddict: I did exactly as you said. I have installed WAMP. I added C:\wamp\bin\php\php5.3.0\ext to my PATH env variable. Also the php.ini is OK. I restarted tomcat. I am still getting the same error.
Bruce
+1  A: 

Probably due to some missing libmysql.dll, try to look for this file (windows find could help) and make sure it sit's on a directory belonging to you PATH. (see this topic)

RC
@RC: I did as you said. Still the same error.
Bruce
Hum, try to put `libmysql.dll` in `c:\windows\system32` and see if that's help.
RC