I posted this in the database section and did not get any meaningful help. So I repost it here and hope the high volume in this section will give me some help.
Here is the problem I am facing: I am using PHP 5.0.3 and MySql 4.1.10. PHP works with MySql well as an Apache module. However, when I run php as a CLI script and try to connect to MySql, no sql query seems to be executed (I do not get anything for simple "select * from ..." query). There is no error message either. I actually tried to pass in a none-existing database, invalid username/password when connect to MySql for debug purpose, I still receive no error message. Does someone know what possibly goes wrong? I can run php CLI script without problem if it does not access MySql (for example, print out "hello world").
Here is phpinfo() output related to MySql config:
mysql
MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 4.1.10a
MYSQL_MODULE_TYPE => external
MYSQL_SOCKET => /tmp/mysql.sock
MYSQL_INCLUDE => -I/usr/local/mysql/include
MYSQL_LIBS => -L/usr/local/mysql/lib -lmysqlclient
Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off
I desparately want to get over this problem. Any enlightment will be greatly appreciated.