开发者

MySQL functions not working when PHP script is called from exec()

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开发者_StackOverflow the browser it works fine. What's happening here? Any ideas?

Thank you for your time


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜