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()
php-cli.ini might be the file your command line php interpreter is using.