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

0

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.