2

I have a PHP script with PDO.

On the command line it runs OK.

But to run it in eclipse I have to edit php.ini. I have to add

extension=pdo.so

Can someone explain me this?

Thanks,

Eric J.

3
  • I think you are using two php.ini , one for command line and other for website (eclipse). use the phpinfo() in command line and eclipse and check this. Commented Oct 19, 2012 at 13:03
  • Where can I see it in phpinfo? Commented Oct 19, 2012 at 13:25
  • 1
    Search for Loaded Configuration File and additional .ini files parsed. Commented Oct 19, 2012 at 13:28

1 Answer 1

1

try

The include_path option in the php.ini specified in the Eclipse preferences is ignored when "Run > as PHP script".

Reproducible: Always

Steps to Reproduce:

  1. Launch a script with phpinfo() in command line
  2. In eclipse, configure the php executable, with its php.ini
  3. In eclipse, run the php "as PHP script", and see that the include_path is not the same as the one in the command line
Sign up to request clarification or add additional context in comments.

1 Comment

NullPointer, Thanks, I see what you mean. With an eclipse configuration, there is no include_path. What I see is that eclipse copies php.ini in a /tmp directory , and and .ini files in php.d directory on my fedora machine are missed. Can one fix that in eclipse?

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.