PHP problem |
Author: |
Message: |
Snake
Full Member
Posts: 210 Reputation: 4
35 / /
Joined: Jan 2004
|
O.P. PHP problem
ok i finaly got PHP working on my site now i just keeping geting this erro quote: There was an error with the database that runs this site. An e-mail has been dispatched to the Board administrator informing them of the problem.
If you would like to contact the admin directly at user@host.com
The specific Error was:
Can't connect to MySQL server on 'localhost' (10061)
so i can't open anything of PHP b/e of My SQL how do i set it up??
|
|
06-01-2004 10:04 PM |
|
|
KeyStorm
Elite Member
Inn-sewer-ants-pollie-sea
Posts: 2156 Reputation: 45
38 / / –
Joined: Jan 2003
|
RE: PHP problem
If it's your own computer (ie a home-webserver) you'll need to install mysql separately, since it seems that it doesn't exist.
More ingo at: http://www.mysql.org
|
|
06-01-2004 10:10 PM |
|
|
Snake
Full Member
Posts: 210 Reputation: 4
35 / /
Joined: Jan 2004
|
O.P. RE: PHP problem
Ok i did exactly what u said but i still get the same erro, by the sounds of it i need to set up me server program 2 it how do i set up MySQL up to the server program??
|
|
06-01-2004 10:42 PM |
|
|
Chris.1
Full Member
addicted to the net
Posts: 363 Reputation: 3
37 / / –
Joined: Jun 2003
|
RE: PHP problem
What script is it you're running? What version of PHP / MySQL are you running? Did you compile PHP / Apache with MySQL support? Have you checked your script config to make sure it has the correct details?
|
|
06-02-2004 11:56 AM |
|
|
^Snog
Junior Member
WrsTeam
Posts: 24
37 / / –
Joined: May 2004
|
|
06-02-2004 12:47 PM |
|
|
KeyStorm
Elite Member
Inn-sewer-ants-pollie-sea
Posts: 2156 Reputation: 45
38 / / –
Joined: Jan 2003
|
RE: PHP problem
Why don't you uninstall them all and use xampp? http://www.apachefriends.org.
It has Apache, PHP, mysql, Filezilla server, server stats and other applications and needs no installation. Execute mysql_start.exe and you're ready to run on localhost.
(well, there is a setup.bat, but I doubt it installs any dlls or any registry setting, but I dunno, it works great for hoem webserver)
|
|
06-02-2004 01:02 PM |
|
|
jren207
Senior Member
JR! - We <3 Fanta
Posts: 870 Reputation: 28
35 / / –
Joined: Sep 2003
|
RE: PHP problem
If you do have MySQL installed, open ur script and find a part near the top of it which has stuff like:
$user="root"; //username
$db="yourdatabase"; //database
$host="localhost"; //
$pass="yourpassword"; //password
This tells the script the info to connect to your database.
And also make sure the service is running in the services list.
|
|
06-04-2004 01:15 PM |
|
|
KeyStorm
Elite Member
Inn-sewer-ants-pollie-sea
Posts: 2156 Reputation: 45
38 / / –
Joined: Jan 2003
|
RE: PHP problem
quote: Originally posted by jren207
If you do have MySQL installed, open ur script and find a part near the top of it which has stuff like:
$user="root"; //username
$db="yourdatabase"; //database
$host="localhost"; //
$pass="yourpassword"; //password
This tells the script the info to connect to your database.
And also make sure the service is running in the services list.
WTF? If it's your script and you're not used to PHP yet, you don't declare such variables separately, you just do mysql_connect("loicalhost", "username", ...
Instead, you should download phpMyAdmin, That will make life easier when it comes to manage you DBs
|
|
06-04-2004 01:19 PM |
|
|
Stigmata
Veteran Member
Posts: 3520 Reputation: 45
21 / /
Joined: Jul 2003
|
RE: PHP problem
quote: Originally posted by KeyStorm
phpMyAdmin
* Stigmata has never worked out how to use it
make sure u enable ur computer as a server in the control panel
* Stigmata trys not to sound like a noob
|
|
06-04-2004 01:23 PM |
|
|
jren207
Senior Member
JR! - We <3 Fanta
Posts: 870 Reputation: 28
35 / / –
Joined: Sep 2003
|
RE: PHP problem
I mean when you set this in say config.php (or similar). Then the mysql_connect function takes the variables from the config file.
$db="yourdatabase"; //database
mysql_connect ($db, $user,...
You need to define info or it will not be able to login to the MySQL server.
The script wont know where to get it's data from!!!
|
|
06-04-2004 01:27 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|