mysql calls work from command line but not from web (apache) on win xp

mysql calls work from command line but not from web (apache) on win xp

am 09.09.2007 07:19:54 von Colorado Trout

From a command prompt, the calls to mysql work, but from a browser they do
not..

Fatal error: Call to undefined function mysql_pconnect() in
D:\work\php\chorelist.php on line 139

is the error, but basically it just means it cannot find mysql..

Re: mysql calls work from command line but not from web (apache) on win xp

am 09.09.2007 10:01:07 von shimmyshack

On Sep 9, 6:19 am, "Colorado Trout"
wrote:
> From a command prompt, the calls to mysql work, but from a browser they do
> not..
>
> Fatal error: Call to undefined function mysql_pconnect() in
> D:\work\php\chorelist.php on line 139
>
> is the error, but basically it just means it cannot find mysql..

yeah its probably means that you have not adjusted the php.ini file
that apache uses, whereas you have adjusted the php.ini file for the
client version of php.
This is usually because you have installed apache, php and mysql
separately, if you have (as you shuld have) set up php to run as a
module within apache, you will need to place a copy of the php.ini
file in apache/bin and then the server will use this rather than the
php.ini inside the php folder where php.exe resides. hope that makes
sense - a bit mangled cos it's early on sunday morning!

Re: mysql calls work from command line but not from web (apache)on win xp

am 09.09.2007 15:51:28 von Jerry Stuckle

Colorado Trout wrote:
> From a command prompt, the calls to mysql work, but from a browser they do
> not..
>
> Fatal error: Call to undefined function mysql_pconnect() in
> D:\work\php\chorelist.php on line 139
>
> is the error, but basically it just means it cannot find mysql..
>
>
>
>
>

No, it means it can't find the MySQL extensions in PHP. It has nothing
to do with whether it finds mysql or not.

Look at phpinfo(). You'll find MySQL isn't listed there. Look at where
it says it's loading the configuration file from. Go to that file and
enable the php_mysql extension.

One other thing which will stop it from loading (under Windows) is not
having the MySQL client DLL in the PATH environment variable.

And BTW - don't use pconnect(). It will slow your system down, unless
you're getting 100K hits per minute or more.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================