I have just installed MySQL on Windows and cannot find the Document Root, where would that be??? At least if I write some PHP Codes, I can do it offline before I upload then, thanks for the help..
First, MySQL is a Database engine, not a Web Server. For a web server I would recommend Apache. Also make sure you get the PHP module.
yes and no...
Yes you have to install apache, but NO it will not compile PHP source, (and if I want to be strict the reason would be becaus PHP is not a compiled language).
given that reason above you need to install apache, php, and mysql. Since you have mysql already you need to install apache and php. then you have to modify the apache config file to link it with php.
But I think if you install apache first then the installation will detect the php and automatically configure your settings.
Things to check would be firewall settings and php configurations. There is (I think) a package for that called the wampserver or something which you can install and it will give you less problems as it also includes phpMyAdmin and some other useful stuff.
Don't get me wrong as I believe if and when I help someone I also help myself whereby whatever someone learns I also learn.
But I will also accept credits or reps if you really want to part with it.
It depends on what you are trying to achieve.
A full installation requires all 3 parts (MySQL, Apache, PHP) but for testing purposes, there is a simple "lite" version that you can install which covers it all. This isn't a full version but it does allow local testing with a good set of functionality.
I use this because my full site is hosted on-line but I also like to test locally before ftp'ing.
it might be easier for you to just install WAMP (assuming you're running a windows OS), it just about configures everything for you
you can get it from http://www.wampserver.com/en/
it's also a good idea (if you do this WAMP thingy) to uninstall the MySQL, Apache and PHP installations you already have before installing WAMP
Further to what mephis said, the simplest way to get PHP and MySQL working is to use a package. If you're on Windows, use a WAMP.
There are two I can personally recommend and still use, and can help you set up if needed.
If you are using Windows XP, give Apache2Triad a go. In addition to PHP, it will also enable you to use Perl and Python, and several databases (including MySQL), with GUIs and control panels. It is also easy to use once it is set up. All you need to do is to go to http://localhost and you will find your own personal web server (nobody else can see it though).
For any other version of Windows, you should try EasyPHP. It's a lot simpler than Apache2Triad and as it's name implies, a lot easier to set up and get going from the start. It doesn't have Perl or Python and the only database is MySQL. But it does have GUIs.
If I remember rightly, it comes with PHP4, and you have to upgrade it to PHP5 yourself (which can get complicated if you're new to it). But like I said, if you need help then I'm familiar to it.
If you do choose the WAMP path, then uninstall Apache, PHP and MySQL first if you already tried installing them!
Last edited by Scoochi2; 11-11-2008 at 06:43 PM.
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:
I would also suggest wampserver as installing the three individually can waste like 2 hours of your time trying to figure out what went wrong and googling for answers. But if you are like me then just try to figure it out anyway we are here to help.
Don't get me wrong as I believe if and when I help someone I also help myself whereby whatever someone learns I also learn.
But I will also accept credits or reps if you really want to part with it.