Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL crashing on Win98 SE

Status
Not open for further replies.

Darkmare

Programmer
Oct 1, 2002
4
CL
Hi there

I've installed Apache + PHP + MySQL (latest version to OCT 02).

Apache and PHP works perfectly, but the MySQL keeps crashing!

on a php script like this:

$main= mysql_connect("127.0.0.1", "root", "pass");

$main01 = mysql_db_query("test03", "SELECT * FROM general WHERE var LIKE '%url%'", $main);

there are no errors with the 1st line.. but with the other the browser says:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in d:\net\a\index.php on line 6

the problems dissapears for a minute or two restarting the server. But then again it crash. I've tested in my two PC, both with Win98 SE. Same problemas

Help here PLEASE!!
Thanks.
 
hi

so first, this is in php doc on the mysql_db_query() page:
Note: This function has been deprecated since PHP 4.0.6. Do not use this function. Use mysql_select_db() and mysql_query() instead.

next - the prob is that the query you are trying to execute returns false, so your variable $main01 has no data

btw - the mysql server crashes after using mysql_fetch_row()?
 
OK i've changed all the mysql_db_query for mysql_query, but the problem continues

I knew what you said about $main01 not having data. Thanx

But I'm not really sure about if it crashes after that command or "randomly", what if it crash after mysql_fetch_row()?

Thanx
 
well i do not use the winbuild of mysql so i'm not sure if this is a common prob

are you sure mysql is down after running your php script?

try to open a telnet session to the port 3306 after the "crash", if you receive "Connecetd to ..." then your mysql server is up and ready for connections and your prob remains the error while running the query
 
Thanx for that. I telnet it and i connected. As you say, the problem must be in the query, because the echo($main) comman returns a connection ID, where

$main= mysql_connect("127.0.0.1", "root", "pass");

but echo($main01) return false, where

$main01 = mysql_query("SELECT * FROM general WHERE var LIKE '%url%'", $main);

Other things:

The MYSQL seems to forget about the databases. when i use the command mysql_select_db("test03"); PHP returns:
unknown database "test03"

then on the winmysqladmin tool, you can view the installed databases, but after a while as I said, the server forgets about them a list no databases.

My apollogies for my english.

Thanx


 
I found the problem!

a virus called W95.Hybris.gen!

it installs itself to the winsock32.dll detecting all network connections trying to spread across the net. So when a query was made, the virus blocked it and then I got no result on the query, even when I was connected to the server.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top