tags:

views:

25

answers:

2

I have a PHP script I execute in the background from an exec call. Everything works except for the MySQL functions (they don't exist). If I call the script directly from the browser it works fine. What's happening here? Any ideas?

Thank you for your time

+3  A: 

Either your command line php was not compiled with php, or php.ini for your command line php does not have the mysql driver module loaded. You'll need to reconfigure and/or rebuild your php installation.

easel
+2  A: 

Probably, php_mysql.so is not enabled in your main php.ini but is enabled in an additional ini file added to Apache with PHPIniDir.

Compare output of phpinfo() called from the command line and from a web script. You should see the difference between the ini files and directories used.

Quassnoi