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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP/MySql Not Connecting

Status
Not open for further replies.

heshys

MIS
Jan 9, 2003
4
US
I can't seem to get PHP(4.3) & MySQL(3.23) to talk to eachother.
I try:
$dbcnx = mysql_connect("localhost", "root", "");

and I get:
"Fatal error: Maximum execution time of 30 seconds exceeded..."

I suspect the MySQL setup, but I can add tables etc from DOS without issue. It's not password related because if i enter a wrong one i get other errors.

My machine: IIS 5.1, WinXP Pro.

Checked the FAQ and tried the keyword seasrch (it was unavailable) without any luck.
 
If you run the query at the MySQL command prompt, how quick does it run. (i.e. is it exceeding 30 secs????)

Is this a new installation??? Are you sure everything is setup correctly????

 
from the mysql prompt the results are instantaneous.

Yes, this is a new installation. Unfortunately I'm not sure everything was set up correct, but it does seem to work. What tests can I do to figure out where the problems lie?
 
What happens if you replace the localhost with the ip address of the server the mysql database is sitting on????
 
using the -h command line arguement worked fine. replacing localhost in the request with the ip address didn't work.

Any other ideas? something in php.ini? How do I check mysql if a request is even being received?

Also i just noticed the following in WinMySQLadmin. In the myODBC section it tells me Not Found, Driver 3.51 Not Found.

Thos is my my.ini:
#This File was made using the WinMySQLAdmin 1.4 Tool
#1/9/2003 8:28:46 AM

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=C:/mysql
#bind-address=168.100.77.5
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=root
password=
 
I think you should re-install all the packages again.
Use a program like the following from foxserv.
It will install Apache/PHP/MySQL.


This definitely integrates everything together properly.

If you still can not read the database then it must be assumed that the code is incorrect.
 
That's cool.

Is there one with just PHP/MySQL I'd prefer to keep IIS for now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top