Jump to content

Why Is This Server Acting Up Over An Internet Disconnect?


yshua

Recommended Posts

Dear php people:

 

Have an Apache2.2, MySQL5.1.65, PHP5.3.8, Win7 and recently succeeded in configuring it. But when entering data on a screen and hit the submit button to run the program to do my mysql_connect in line, as usual, the IP address cable was disconnected! The following emsg resulted and restarting Apache, and webserver boot failed to get the error cleared.

 

 

Warning: mysql_connect() [C:\Users\Headache2\downloads\php_enhanced_enfunction.mysql-connect.chm]:

[2002] No connection could be made because the target machine actively refused it. (trying to connect

via tcp://localhost:3306) in C:\Program Files (x86)\Apache Software Foundation\

Apache2.2\htdocs\includes\db.php on line 2 Warning: mysql_connect()

[C:\Users\Headache2\downloads\php_enhanced_enfunction.mysql-connect.chm]:

No connection could be made because the target machine actively refused it.

in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\includes\db.php on line 2

Could not connect: No connection could be made because the target machine actively refused it.

 

Would checking phpinfo.php show some setting that is needed changing? Please need to have any

ideas on what to try.

 

Sincerely,

Yshua

Link to comment
Share on other sites

Tried following the suggestion in the error message? It lists the filenames and all.

Also, without knowing what you've done (code-wise) we cannot tell you what you need to do to fix it. With only the error message, most of the time we can just tell you what it has already stated.

 

PS: It's the "Ethernet cable", or "TP cable", not "IP address cable".

Link to comment
Share on other sites

OK, ChristianF:

 

Here is the docile, previously checked out code. Ran well before....

<?php
$mysql = mysql_connect('localhost', 'root', 'mypassword');
if (!$mysql) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db('mydatabase', $mysql);
if (!$db_selected) {
 die ('Can\'t use Selected Database : ' . mysql_error());
}
?>

 

But, honestly, it is back up and running again by having to reinstall MySQL5.1.65! And Pikachu2000 said, "That error doesn't have anything to do with the network cable being disconnected." You misread, or my explanation was unclear to you.... My ethernet cable was inadvertently disconnected when I entered data from a screen on the webserver. Then the server crashed. Then the same screen kept giving that big emsg, regardless what I could do. Does php.ini need to be changed possibly. Oh, also, MySQL refused me to sign on again, if this helps.

 

Thanks, all,

Yshua

Edited by yshua
Link to comment
Share on other sites

He didn't misunderstand, but the problem could be caused by the server crash (which you didn't mention before).

In any case, there's clearly either nothing listening on the port on the localhost, or there's a firewall blocking it. Double (triple) check that the login connection details are correct, and that your MySQL is indeed using the default port. Then verify that the server is actually running, and listening on that port. Lastly, check your server's firewall, and make sure it allows traffic from localhost on that port.

 

You might want to get someone who knows servers and networking to help you out with this though.

 

PS: "php.ini" has nothing to do with this.

Link to comment
Share on other sites

Dear ChristianF:

 

Thanks so much for the brilliant observation that the Windows firewall might be blocking the 5.1.65 version of MySQL noinstall! Finally it dawned on me to check the Control Panel System and Security option, and then the "Allow a program through Windows Firewall" option. MySQL is disallowed as a program to allow on Win7 because of its "noinstall!" Does anyone know a workaround of this?

 

Server down,

Yshua

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.