Shoutbox

PHP problem - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: PHP problem (/showthread.php?tid=26538)

PHP problem by Snake on 06-01-2004 at 10:04 PM

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??
RE: PHP problem by KeyStorm on 06-01-2004 at 10:10 PM

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 ;)


RE: PHP problem by Snake on 06-01-2004 at 10:42 PM

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??


RE: PHP problem by Chris.1 on 06-02-2004 at 11:56 AM

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?


RE: PHP problem by ^Snog on 06-02-2004 at 12:47 PM

http://webmasterstop.com/tutorials/apache-php-mysql-installation.shtml

its explain how instal apache, php, and mysql at once


RE: PHP problem by KeyStorm on 06-02-2004 at 01:02 PM

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) ;)


RE: PHP problem by jren207 on 06-04-2004 at 01:15 PM

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.


RE: PHP problem by KeyStorm on 06-04-2004 at 01:19 PM

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 ;)

RE: PHP problem by Stigmata on 06-04-2004 at 01:23 PM

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
RE: PHP problem by jren207 on 06-04-2004 at 01:27 PM

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!!!


RE: PHP problem by KeyStorm on 06-04-2004 at 01:37 PM

Obviously.
But that's not for any script.

And you also have to define a username and a password fot mySQL.

Again I advice to use Xampp which has everything integrated and doesn't need any installation.

What problems did you have with phpMyAdmin, JW?


RE: PHP problem by Snake on 06-05-2004 at 11:00 AM

ok here is what i got, i run a program called Liteserve, i have php setup on it i think all i need to no is how do i set MySQL to it and how to link the PHP files to it i realy need ur help about ready to pull my hair out!!!!