473,804 Members | 3,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\wit husers>php taaddtt2grp.php
PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resourc
e in C:\prj\quiz\wit husers\header.p hp on line 28
PHP Warning: mysql_fetch_ass oc(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\wit husers\header.p hp on line 29
PHP Warning: mysql_free_resu lt(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\wit husers\header.p hp 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 1578
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\wit husers>php taaddtt2grp.php
PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resourc
e in C:\prj\quiz\wit husers\header.p hp on line 28
PHP Warning: mysql_fetch_ass oc(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\wit husers\header.p hp on line 29
PHP Warning: mysql_free_resu lt(): supplied argument is not a valid MySQL
result
resource in C:\prj\quiz\wit husers\header.p hp 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*******@gmai l.com> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
5126
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. Simplified, it'd be: $con1=mysql_connect($server, $user, $pass); mysql_select_db($database1, $con1); $res1=mysql_query($sql1, $con1); $con2=mysql_connect($server, $user, $pass);
4
5781
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(). This is my script: <?php $host = '192.168.100.5'; $user = 'root'; $pass = <password>;
1
3706
by: pleake | last post by:
Following is a logon.asp script. This script works when IIS is reset each day. The epapi object is a vendor api program I do not have the code for! The logon process involves three servers: the IIS server, a Novell Server with executable programs on it including the API program, and an Oracle server. The logon sequence is to use the IIS anonymous user account to access the Novell Server which in turn instructs the API programs as to...
2
3464
by: Jon Drukman | last post by:
I've got a library of PHP code whose first line is a mysql_connect statement, like this: $dbh=mysql_connect() or die("mysql connect failed: $php_errmsg"); Approximately 1% of the time it just fails, for no stated reason: Warning: mysql_connect() http://www.php.net/function.mysql-connect]: in /var/httpd/htdocs/pi/pi.php on line 3 mysql connect failed:
4
6595
by: OneSolution | last post by:
Coming from a java background, I've been taught that connection pooling is the best thing due to the obvious benefits. I found out that the above pconnect() function will pool connections. So how do you use it properly? There's another post in this list stating that the user got connection refused error messages. Also, is there a real performance increase due to connection pooling with MySQL in PHP?
1
1920
by: goodmann | last post by:
Paris, Le 30 08 MMVII, Hi, I have a problem using to connect to MYSQL from one server to another server. In other words, On server A, I have my PHP files, and on server B, I have MySQL installed.
14
2126
by: farhan | last post by:
Hi, Please divert me if this is not the right group to be posting this question. I am a Linux client trying to connect to a mysql windows server via php, upon hitting the mysql_connect line in my php script, it simply stops executing. In other words anything or'ed with it, like echo does not end up in the html source. I'm not entirely sure on the inner workings of php scripting so I can't explain why echo commands
7
2852
by: criveraf | last post by:
Hi there, I wasn't sure where to put this question, since it deals with both PHP and MySQL. I apologize if this is not the correct forum for this. I am working with a simple PHP application using MySQL at the data layer. This is on a Windows XP machine, using IIS 6.0, MySQL 5.0, PHP 5. The problem I am having is that a call to mysql_connect is not working, it is not doing anything at all. I'm not getting any error messages, or...
2
2028
by: Ralf Seliger | last post by:
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
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.