473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
Jun 2 '08 #1
2 2004
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.
js*******@attglobal.net
==================

Jun 2 '08 #2
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
--
Jun 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LRW | last post by:
I'm working on some scripts someone else made, and it's littered with repetitive mysql_connect's and mysql_select_db's. For example: // MAKE SURE IT IS A VALID PRODUCT $connection2 =...
10
by: Alvaro G Vicario | last post by:
I need that my script retrieves data from two different databases so I use mysql_connect() to open two connections. I have only one server, user and password, just two different databases....
4
by: Andrew Clark | last post by:
Hello, I am having trouble connecting to my server with mysql_connect(). I can connect via the command line on the server and with phpMyAdmin over our network, but not though mysql_connect()....
2
by: Sugapablo | last post by:
I have a small test script connecting to a MySQL database. It seems to work, unless I try to use the resource link identifier returned by mysql_connect(); This works and returns all the rows in...
19
by: Michael | last post by:
Hi, I'm trying to do something which should be very simple - connect to the MySQL database. Here is the call, followed by the error msg. $conn = mysql_connect("localhost", "root", ""); ...
6
by: GD | last post by:
Hi All, I've got MySQL 5.0.21 running on Windows Server 2003, and php running on Apache on a Linux box (Fedora Core 4). Previously when the pages were running on an IIS server the connection...
1
by: hugo | last post by:
Hello people, There is a problem is that mysql_connect() somehow caches last sessions IP and is not using the one which you put into host place. Has anyone made mysql_connect() from php to...
5
by: yoyoz | last post by:
Help!!!! i am newbie to php, i was trying to establish the connection to another machine (solaris) so that i can retrieve data from the database stored inside there using my own PC. for your...
1
by: DelScorcho | last post by:
Hi, I'm using a VB6 application to open MS Access; and it works fine, but when the code completes execution, Access automatically closes (I want it to stay open).... I've written code like this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.