Reputation: 164
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
Upvotes: 2
Views: 155
Reputation: 425523
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.
Upvotes: 2
Reputation: 4048
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.
Upvotes: 3