mysql_connect never completes execution

This is a discussion on mysql_connect never completes execution within the PHP Language forums, part of the PHP Programming Forums category; Hi, I hope someone here has a clue as to what is going on since I am completely baffled by ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-22-2008
Ralf Seliger
 
Posts: n/a
Default mysql_connect never completes execution

Hi,

I hope someone here has a clue as to what is going on since I am
completely baffled by the following:

I'm working with a PHP/MySQL-web application called Moodle. When this
application is started from a web browser, one of the first things to
happen is a call to mysql_connect which succeds without any problems.

One component of moodle is a so called chat daemon which is just another
PHP-Script. The only difference to the other scripts that together make
up Moodle is that this script is to be started from the command line.

The script also calls mysql_connect from the same line with the same
arguments, but this call to mysql_connect never returns. No connection
ID, no false value, no error message, just nothing. mysql_connect is
called but never completes execution.

And I did wait longer than mysql.connect_timeout.

Can anybody here offer an explanation?

Regards
Ralf Seliger
Reply With Quote
  #2 (permalink)  
Old 04-28-2008
Jerry Stuckle
 
Posts: n/a
Default Re: mysql_connect never completes execution

Ralf Seliger wrote:
> Hi,
>
> I hope someone here has a clue as to what is going on since I am
> completely baffled by the following:
>
> I'm working with a PHP/MySQL-web application called Moodle. When this
> application is started from a web browser, one of the first things to
> happen is a call to mysql_connect which succeds without any problems.
>
> One component of moodle is a so called chat daemon which is just another
> PHP-Script. The only difference to the other scripts that together make
> up Moodle is that this script is to be started from the command line.
>
> The script also calls mysql_connect from the same line with the same
> arguments, but this call to mysql_connect never returns. No connection
> ID, no false value, no error message, just nothing. mysql_connect is
> called but never completes execution.
>
> And I did wait longer than mysql.connect_timeout.
>
> Can anybody here offer an explanation?
>
> Regards
> Ralf Seliger
>


That's strange. What happens if you run the script from a command line
prompt? Maybe something else is getting involved.

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

Reply With Quote
  #3 (permalink)  
Old 04-28-2008
Álvaro G. Vicario
 
Posts: n/a
Default Re: mysql_connect never completes execution

Ralf Seliger escribió:
> One component of moodle is a so called chat daemon which is just another
> PHP-Script. The only difference to the other scripts that together make
> up Moodle is that this script is to be started from the command line.


Command line PHP is typically parsed through a different binary and has
a few different options:

http://php.net/manual/en/features.commandline.php

Apart from that, it's likely that your command line binary is using a
different php.ini file. Run <?php phpinfo(); ?> from command line to
check the exact settings being used. I'd say display_errors is off and
that's why you get no errors :-?


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:39 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0