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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 ================== |
|
|||
|
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 -- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|