Page 1 of 1

TESTING MYSQL

Posted: Wed May 25, 2005 10:33 am
by Parody
Im new to MYSQL, so this is probably a really easy question to answer.

How do I test to see if a MYSQL database works with all my php pages?

Reason: I have coded some php pages that need data from a MYSQL database and I don't want to have to upload everything to a server somewhere in 'Cyberspace' only to find out there are some major problems. Is there a program that can 'pretend' to host a MYSQL database on my computer?

:? :? :D

Posted: Wed May 25, 2005 10:36 am
by JayBird
viewtopic.php?t=21400

read "Install a local server"

Posted: Wed May 25, 2005 10:37 am
by Sphen001
Hi,

What you are looking for is to create a localhost server enviroment. In effect, you will be installing a server on your computer. There are several pre-packaged ones that you can find on the internet, that come with PHP, MySQL, and Apache. You can find a lot of them at http://www.hotscripts.com . One of the most popular ones is EasyPHP. Once you have it installed, you will have a localhost server enviroment where you can test your scripts.

Hope this helps :D

Sphen001

Posted: Wed May 25, 2005 10:41 am
by Parody
I'm just about to install EASYPHP but, one question, apart from editing the php ini file do I have to do anything else or will it all be done for me?

Posted: Wed May 25, 2005 10:42 am
by JayBird
its pretty much "out of the box"

Posted: Wed May 25, 2005 10:44 am
by Parody
Only one error:

A mysql port is being used by mysqld-nt.exe

Posted: Wed May 25, 2005 11:26 am
by phpScott
that means you already have mysql installed.
remove it then rerun your program.

Posted: Wed May 25, 2005 11:52 am
by Parody
It works now, that problem has been fixed anyway. But, I get this error:

Code: Select all

Fatal error: Call to undefined function mysql_connect() in c:\program files\apache group\Apache\htdocs\test_mysql.php on line 3

When I use this line of code:

Code: Select all

$dbh = mysql_connect(&quote;localhost&quote;, &quote;localhost&quote;, &quote;root&quote;);
That is line 3 by the way.


THANKS :D

Posted: Thu May 26, 2005 2:55 am
by ody
In you php.ini do you have

;extension=php_mysql.dll

uncommented? by this I mean without the ';'. If not uncomment it and restart Apache.

Posted: Sat May 28, 2005 1:37 am
by Mastermind