PHP CLI & mysql_pconnect

6 views
Skip to first unread message

Rob Isakson

unread,
Oct 11, 2009, 3:59:30 PM10/11/09
to crt-viele-r...@googlegroups.com
I know this is a PHP issue, but I am wondering if anyone else has
encountered it and knows what to do.

I'm runnning a standard WAMP server and I can run viele fine from the
browser, however when I run it from command line it says that the function
mysql_pconnect() cannot be found. I created a php page that had nothing up a
pconnect in it and it returned the normal result resource ID, so it works
from the browser, but not from the command line.

I'm running PHP 5.2.9. Has anyone seen this before

Thanks,
Rob Isakson


"Look at a day when you are supremely satisfied at the end. It's not a day
when you lounge around doing nothing. It's when you've had everything to do
and you've done it." ~ Margaret Thatcher

Jim Ekleberry

unread,
Oct 11, 2009, 4:17:52 PM10/11/09
to crt-viele-r...@googlegroups.com
PHP_CLI uses a different php.ini file than the one used by your web server. Check that php.ini file to ensure you have the proper settings enabled and extensions loaded.





________________________________
From: Rob Isakson
To: viel...@crt.realtors.org
Sent: Sun, October 11, 2009 2:59:30 PM
Subject: [viele-dev] PHP CLI & mysql_pconnect


I know this is a PHP issue, but I am wondering if anyone else has encountered it and knows what to do.

I'm runnning a standard WAMP server and I can run viele fine from the browser, however when I run it from command line it says that the function mysql_pconnect() cannot be found. I created a php page that had nothing up a pconnect in it and it returned the normal result resource ID, so it works from the browser, but not from the command line.

I'm running PHP 5.2.9. Has anyone seen this before

Thanks,
Rob Isakson


"Look at a day when y ou are supremely satisfied at the end. It's not a day when you lounge around doing nothing. It's when you've had everything to do and you've done it." ~ Margaret Thatcher




Rob Isakson

unread,
Oct 11, 2009, 5:44:11 PM10/11/09
to crt-viele-r...@googlegroups.com
Thanks for the swift response Jim. I searched my drive for all php.ini files
and they all have the proper mysql extensions enabled, and they all have
persistent connections enabled with -1 (lo limit) connection limits.

What else could it be? I have tried restarting WAMP, installed a few
versions of php as modules and they all produce the same error, restarting
WAMP each time of course. I'm stumped on this one.

-Rob



On Sun, Oct 11, 2009 at 3:17 PM, Jim Ekleberry wrote:

> PHP_CLI uses a different php.ini file than the one used by your web server.
> Check that php.ini file to ensure you have the proper settings enabled and
> extensions loaded.
>
>
> ------------------------------
> *From:* Rob Isakson
> *To:* viel...@crt.realtors.org
> *Sent:* Sun, October 11, 2009 2:59:30 PM
> *Subject:* [viele-dev] PHP CLI & mysql_pconnect

>
> I know this is a PHP issue, but I am wondering if anyone else has
> encountered it and knows what to do.
>
> I'm runnning a standard WAMP server and I can run viele fine from the
> browser, however when I run it from command line it says that the function
> mysql_pconnect() cannot be found. I created a php page that had nothing up a
> pconnect in it and it returned the normal result resource ID, so it works
> from the browser, but not from the command line.
>
> I'm running PHP 5.2.9. Has anyone seen this before
>
> Thanks,
> Rob Isakson
>
>
> "Look at a day when you are supremely satisfied at the end. It's not a day

> when you lounge around doing nothing. It's when you've had everything to do
> and you've done it." ~ Margaret Thatcher
>
>
> _______________________________________________
> viele-dev mailing list
> viel...@crt.realtors.org
> http://mail.crt.realtors.org/mailman/listinfo/viele-dev
>
>

Jim Ekleberry

unread,
Oct 11, 2009, 9:10:48 PM10/11/09
to crt-viele-r...@googlegroups.com
>From the command line, if you execute:

php -r "phpinfo();" > phpinfo.txt

this will create a phpinfo.txt file in your current directory. Open the phpinfo.txt file in a text editor and then do a search for php.ini to find the location of the php.ini file your cli version is using.

You can also do a search for mysql to find the extension definition block. Verify the information presented is proper. Also ensure your version of PHP as your command line version can be completely different than your web server module version.





________________________________
From: Rob Isakson
To: For discussion on the development of viele rets
Sent: Sun, October 11, 2009 4:44:11 PM
Subject: Re: [viele-dev] PHP CLI & mysql_pconnect


Thanks for the swift response Jim. I searched my drive for all php.ini files and they all have the proper mysql extensions enabled, and they all have persistent connections enabled with -1 (lo limit) connection limits.

What else could it be? I have tried restarting WAMP, installed a few versions of php as modules and they all produce the same error, restarting WAMP each time of course. I'm stumped on this one.

-Rob



On Sun, Oct 11, 2009 at 3:17 PM, Jim Ekleberry wrote:

PHP_CLI uses a different php.ini file than the one used by your web server. Check that php.ini file to ensure you have the proper settings enabled and extensions loaded.
>
>
>
>
>
________________________________
From: Rob Isakson
>To: viel...@crt.realtors.org
>Sent: Sun, October 11, 2009 2:59:30 PM
>Subject: [viele-dev] PHP CLI & mysql_pconnect

>
>
>>I know this is a PHP issue, but I am wondering if anyone else has encountered it and knows what to do.
>
>I'm runnning a standard WAMP server and I can run viele fine from the br owser, however when I run it from command line it says that the function mysql_pconnect() cannot be found. I created a php page that had nothing up a pconnect in it and it returned the normal result resource ID, so it works from the browser, but not from the command line.

Rob Isakson

unread,
Oct 11, 2009, 9:56:04 PM10/11/09
to crt-viele-r...@googlegroups.com
Thanks Jim!

I got it squared away. I had a work around by defining the php.ini file in
the php command that I was issuing, but using your method I was able to find
that the file I wanted wasn't named php.ini and that's why it didn't show up
in my search.

Thanks again,
Rob


"Look at a day when you are supremely satisfied at the end. It's not a day
when you lounge around doing nothing. It's when you've had everything to do
and you've done it." ~ Margaret Thatcher


On Sun, Oct 11, 2009 at 8:10 PM, Jim Ekleberry wrote:

> From the command line, if you execute:
>
> php -r "phpinfo();" > phpinfo.txt
>
> this will create a phpinfo.txt file in your current directory. Open the
> phpinfo.txt file in a text editor and then do a search for php.ini to find
> the location of the php.ini file your cli version is using.
>
> You can also do a search for mysql to find the extension d efinition block.

> Verify the information presented is proper. Also ensure your version of PHP
> as your command line version can be completely different than your web
> server module version.
>
>
> ------------------------------
> *From:* Rob Isakson
> *To:* For discussion on the development of viele rets <
> viel...@crt.realtors.org>
> *Sent:* Sun, October 11, 2009 4:44:11 PM
> *Subject:* Re: [viele-dev] PHP CLI & mysql_pconnect

>
> Thanks for the swift response Jim. I searched my drive for all php.ini
> files and they all have the proper mysql extensions enabled, and they all
> have persistent connections enabled with -1 (lo limit) connection limits.
>
> What else could it be? I have tried restarting WAMP, installed a few
> versions of php as modules and they all produce the same error, restarting
> WAMP each time of course. I'm stumped on this one.
>
> -Rob
>
>
> On Sun, Oct 11, 2009 at 3:17 PM, Jim Ekleberry wrote:
>
>> PHP_CLI uses a different php.ini file than the one used by your web
>> server. Check that php.ini file to ensure you have the proper settings
>> enabled and extensions loaded.
>>
>>
>> ------------------------------
>> *From:* Rob Isakson
>> *To:* viel...@crt.realtors.org
>> *Sent:* Sun, October 11, 2009 2:59:30 PM
>> *Subject:* [viele-dev] PHP CLI & mysql_pconnect

>>
>> I know this is a PHP issue, but I am wondering if anyone else has
>> encountered it and knows what to do.
>>
>> I'm runnning a standard WAMP server and I can run viele fine from the
>> browser, however when I run it from command line it says that the function

>> mysql_pconnect() cannot be found. I created a php page that had nothing up a
>> pconnect in it and it returned the normal result resource ID, so it works
>> from the browser, but not from the comma nd line.

Jim Ekleberry

unread,
Oct 11, 2009, 10:54:56 PM10/11/09
to crt-viele-r...@googlegroups.com
Glad to hear you got it fixed and working Rob. :)






________________________________
From: Rob Isakson
To: For discussion on the development of viele rets
Sent: Sun, October 11, 2009 8:56:04 PM
Subject: Re: [viele-dev] PHP CLI & mysql_pconnect


Thanks Jim!

I got it squared away. I had a work around by defining the php.ini file in the php command that I was issuing, but using your method I was able to find that the file I wanted wasn't named php.ini and that's why it didn't show up in my search.

Thanks again,
Rob

"Look at a day when you are supremely satisfied at the end. It's not a day when you lounge around doing nothing. It's when you've had everything to do and you've done it." ~ Margaret Thatcher



On Sun, Oct 11, 2009 at 8:10 PM, Jim Ekleberry wrote:

>From the command line, if you execute:
>
>php -r "phpinfo();" > phpinfo.txt
>
>this will create a phpinfo.txt file in your current directory. Open the phpinfo.txt file in a text editor and then do a search for php.ini to find the location of the php.ini file your cli version is using.
>
>You can also do a search for mysql to find the extension definition block. Verify the information presented is proper. Also ensure your version of PHP as your command line version can be completely different than your web server module version.
>
>
>
>
>
________________________________
From: Rob Isakson
>To: For discussion on the development of viele rets
>Sent: Sun, October 11, 2009 4:44:11 PM
>Subject: Re: [viele-dev] PHP CLI & mysql_pconnect

>
>
>Thanks for the swift response Jim. I searched my drive for all php.ini files and they all have the proper mysql extensions enabled, and they all have persistent connections enabled with -1 (lo limit) connection limits.
>
>What else could it be? I have tried restarting WAMP, installed a few versions of php as modules and they all produce the same error, restarting WAMP each time of course. I'm stumped on this one.
>
>-Rob
>
>
>
>On Sun, Oct 11, 2009 at 3:17 PM, Jim Ekleberry wrote:
>
>>>
>>PHP_CLI uses a different php.ini file than the one used by your web server. Check that php.ini file to ensure you have the proper settings enabled and extensions loaded.
>>
>>
>>
>>
>>
________________________________
From: Rob Isakson
>>To: viel...@crt.realtors.org
>>Sent: Sun, October 11, 2009 2:59:30 PM
>>Subject: [viele-dev] PHP CLI & mysql_pconnect

>>
>>
>>>>I know this is a PHP issue, but I am wondering if anyone else has encountered it and knows what to do.
>>
>>I'm runnning a standard WAMP server and I can run viele fine from the browser, how ever when I run it from command line it says that the function mysql_pconnect() cannot be found. I created a php page that had nothing up a pconnect in it and it returned the normal result resource ID, so it works from the browser, but not from the command line.

>>
>>I'm running PHP 5.2.9. Has anyone seen this before
>>
>>Thanks,
>>Rob Isakson
>>
>>
>>"Look at a day when you are supremely satisfied at the end. It's not a day when you lounge around doing nothing. It's when you've had everything to do and you've done it." ~ Margaret Thatcher
>>
>>
>>_______________________________________________
>>>>viele-dev mailing list
>>viel...@crt.realtors.org
>>http://mail.crt.realtors.org/mailman/listinfo/viele-dev
>>
>>
>
>
>_______________________________________________
>>viele-dev mailing list
>viel...@crt.realtors.org
>http://mail.crt.realtors.org/mailman/listinfo/viele-dev
>
>




< /BODY>
Reply all
Reply to author
Forward
0 new messages