Re: [PDO] Re: [PHP] PDO working via Apache but not at the command line?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Things to check:

- Environment: what env vars are set or not set in your Apache vs. CLI
- Owner: are you running as the same user as your web server?
- Do you or the web server have some kind of "rc" file that might impact how things run?

Suggestion:

Use "sudo -u webserverusername -s" to run a shell as your web server user, then try to run the CLI.

Get the environment to match up with your webserver.

If this still doesn't work, it might be something more esoteric; check to see if you have other apache modules loaded that might also use FreeTDS or ODBC and that might be messing with things.

Use "strace php db-dump.php" to see what the CLI is up to.
Use "strace -p <apachepid>" to see what the Apache version is up to (probably want to run apache -X to make this easier).

--Wez.

On Oct 18, 2010, at 5:26 PM, Scott Baker wrote:

On 10/18/2010 02:17 PM, ash@xxxxxxxxxxxxxxxxxxxx wrote:
It's most likely because both cli and web modules are using different
php.ini config files. See what the output of a phpinfo() call in both
browser and command line.

I didn't even think about it parsing different php.ini files. Checking the output of phpinfo() I see it's calling the same php.ini (/usr/local/lib/php.ini) though. :(


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux