What might be the reason of the following problem.
PHP function mysql_connect()
works fine if I execute it from
command line (php -r "mysql_connect('127.0.0.1', 'db_user', 'db_pass');")
.
The same call with the same parameters fails for PHP running as an Apache module.
MySQL server is running remotely, connection to it is forwarded using SSH: ssh -fN -L 3306:localhost:3306 remote_host
Any ideas what might be wrong?