1

I'm using EasyPHP on Windows. When I try to run a script (from the command line), I'm having the following error:

DB connection error: MySQL functions missing, have you compiled PHP with the --with-mysql option?

It was strange since all MySQL functions are working fine when running PHP scripts using HTTP. I checked my php.ini file and found all MySQL extensions there:

extension=php_mysql.dll
extension=php_mysqli.dll

Any idea what is wrong?

1 Answer 1

3

Your PHP CLI does not use the php.ini where the mysql extensions are enabled. Run php --ini on the command line to see which ini it uses and enable the extensions therein.

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

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.