471,092 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

mysql_connect() losing connections from cmd line

I am running windows XP and PHP 5.1.2 with the MySQL extension enabled in
php.ini.
I am using mysql_connect() without any fancy options to connect to MySQL and
do some stuff without using mysql_close() at the end, and debugging several
files in sequence.

I eventually run into
C:\prj\quiz\withusers>php taaddtt2grp.php
PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resourc
e in C:\prj\quiz\withusers\header.php on line 28
PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\withusers\header.php on line 29
PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\withusers\header.php on line 30
in all sorts of programs. Once I get this, I am not able to run a PHP that
uses those include files again. I suspect there's some sort of cacheing
going on here. this is driving me up the wall. One time, it took my
database down during a simple DROP TABLE operation. The database service
couldn't reconnect when I restarted it. shutting down & restarting the
database doesn't help.

any suggestions on how to proceed?
Mar 26 '06 #1
3 1502
found the source of the problem in my header file.
Gotta stop posting like this.
Still, I think it's odd that PHP was able to take out the MySQL server once.

"Jim Michaels" <NO***************@yahoo.com> wrote in message
news:Ts******************************@comcast.com. ..
I am running windows XP and PHP 5.1.2 with the MySQL extension enabled in
php.ini.
I am using mysql_connect() without any fancy options to connect to MySQL
and do some stuff without using mysql_close() at the end, and debugging
several files in sequence.

I eventually run into
C:\prj\quiz\withusers>php taaddtt2grp.php
PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resourc
e in C:\prj\quiz\withusers\header.php on line 28
PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\withusers\header.php on line 29
PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\withusers\header.php on line 30
in all sorts of programs. Once I get this, I am not able to run a PHP
that uses those include files again. I suspect there's some sort of
cacheing going on here. this is driving me up the wall. One time, it
took my database down during a simple DROP TABLE operation. The database
service couldn't reconnect when I restarted it. shutting down &
restarting the database doesn't help.

any suggestions on how to proceed?

Mar 26 '06 #2
> found the source of the problem in my header file.

Thanks for posting back with the troubled area. It's a good sign. You
might point out the details for others.

Thanks.
--
Raqueeb Hassan
Bangladesh

Mar 26 '06 #3

"Raqueeb Hassan" <wi*******@gmail.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
found the source of the problem in my header file.


Thanks for posting back with the troubled area. It's a good sign. You
might point out the details for others.

Thanks.
--
Raqueeb Hassan
Bangladesh


Not much to tell. Just one of those mindless errors. Can't believe I did
it.
For one thing, I was including dbinc.php after using the functions. it's a
wonder it actually worked sometimes (bug in PHP?). I also had to move the
functions up before I used them.
Mar 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Alvaro G Vicario | last post: by
4 posts views Thread by Andrew Clark | last post: by
2 posts views Thread by Jon Drukman | last post: by
4 posts views Thread by OneSolution | last post: by
1 post views Thread by goodmann | last post: by
14 posts views Thread by farhan | last post: by
2 posts views Thread by Ralf Seliger | last post: by

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.