Thursday, June 05, 2008

When I try to connect to mysql from php I get this error: "Call to unsupported or undefined function mysql_connect();"

Either you are missing mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting:

dl("mysql.so"); (on unix)
dl("mysql.dll"); (on windows);

in the top of all the scripts that use mysql.

But it is recommended to compile php with mysql.

No comments: