I have a script which calls mysql_connect() to connect to a MySQL DB. When I run the script in a browser, it works. However, when I run it from a command line
mysql_connect()
Please make sure this line appears in php.ini
extension=php_mysql.dll
Please note that the php.ini used in command line may be different from the php.ini used by apache.