My PHP script gives the error 'Call to undefined function: mysql_connect()' Print

  • 0

This error is usually caused by unecessary or incorrect directives in a custom php.ini file

We usually find this happens when the extension_dir directive is specified within a custom php.ini file - if you are getting this error and you have a custom php.ini that has the extension_dir directive in it then please remove this line which should resolve the problem. 

Using a php.ini found on other webservers or examples given on PHP-related websites will likely cause problems such as this. If this does not resolve the issue, you should contact whoever supplied the script that you are attempting to run as this may suggest a coding issue.


Was this answer helpful?

« Back