Ultra Frosty Posted August 24, 2004 Share Posted August 24, 2004 (edited) This is how to setup Apache + PHP + MySQL on your Windows PC. I hope you like it: Download and Install Apache 1. Download Apache 2.0.52 from The Apache Download Page, and run the installer, and follow what the directions say. 2. Select Custom from the Install Type and click next. 3. Make sure the second screenshot is the same as what your install looks like. Finish the install and goto http://localhost. Note: The place to put your HTML/PHP files is: C:\Apache2\htdocs\ In your system tray you will see a picture thingy for Apache. You can use that to start, stop and restart the webserver. Apache has very, very advanced features that can only be change in the C:\Apache2\conf\httpd.conf file, after you change settings in this file, you must restart Apache. Download and Install PHP 1. Download the PHP 4.3.10 Installer Package from PHP Downloads. (If you want to use extensions later on, download the Zip package. The Installer includes the MySQL extension). 2. Set the install type to 'Advanced' and proceed thru the installer. Follow the dialogs with the defaults unless you know what you are doing (in which case you probably wouldn't be reading this guide). Follow these dialogs to exactly how I have them setup. Install Path Only show errors in PHP pages. Tells installer not to try to configure our Web Server. 3. Goto your C:\PHP directory and copy php4ts.dll to your C:\WINDOWS\system32 directory 4. copy php.ini-recommended to your C:\WINDOWS directory and rename it to php.ini. 5. Open up the C:\Apache2\conf\httpd.conf file in a texteditor like Notepad and find a list of words that say: LoadModule 6. Add the lines: LoadModule php4_module "c:/php/sapi/php4apache2.dll" AddType application/x-httpd-php .php to the end of the list. 7. Save the httpd.conf file and restart Apache. 8. Create a file called info.php and put the code: <? phpinfo(); ?> in the file, save and browse to http://localhost/info.php, if you see a page that is not blank, you have installed PHP correctly. Download and Install MySQL 4.1 Note, MySQL does not work well with 9x/ME, and should only be used with NT/2000/XP/2003 1. Download MySQL 4.1 from MySQL 2. Run the installer 3. Make sure you select the "Complete Install" from the install type 4. Finish the install. 5. In the MySQL Server Instance Configuration, select Reconfigure Instance. 6. Select Detailed Configuration 7. You will have to read the summery of the choices. Choose "Developer Machine" only if you are going to be using MySQL like a large MS Excel Speadsheet. Choose "Server Machine" if you will be running Apache and PHP along with MySQL. Only choose "Dedicated MySQL Server Machine" if you are going to have a box dedicated to running MySQL, and nothing else, you should also have at least 2GB of RAM if you choose this option. 8. Choose "Multifunctional Database". 9. Choose the same drive letter as MySQL is on. Choose C:\MySQL\data for the path. 10. Read the discriptions for how many concurrent connections you will have and choose which is the most suited for you. 11. Make sure "Enable TCP/IP Networking" is checked and the port number must be 3306. 12. Choose the language character set to what you need. 13. Leave the "Modify Security Settings" unchecked and clicke next. 14. Click Execute and you'll have setup and optimized MySQL to your PC's specs. Edited January 29, 2005 by b0b Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/ Share on other sites More sharing options...
crackhbob Posted August 24, 2004 Share Posted August 24, 2004 Or you could just use one of the packages that does it all for you. :D Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584425281 Share on other sites More sharing options...
Bowser265 Posted August 24, 2004 Share Posted August 24, 2004 Or you could just use one of the packages that does it all for you. :D You could, but that doesn't allow for much control. It's also useful to be able to set it up yourself on Windows, as one day you may want to on Linux, and it will be easier if you've got experience with setting it up on a different platform. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584425440 Share on other sites More sharing options...
Daylene Posted August 25, 2004 Share Posted August 25, 2004 oh thank you oh thank youoh thank youoh thank youoh thank youoh thank you I needed this tut so bad :p Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584426497 Share on other sites More sharing options...
rayjin Posted August 25, 2004 Share Posted August 25, 2004 is it alright if it's installed in another drive like "D:\" instead of "C:\" and change the config files accordingly? btw, great tutorial! hehe.. yay! 100 posts! :happy: Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584426540 Share on other sites More sharing options...
draelas Posted August 25, 2004 Share Posted August 25, 2004 you know if you have an old computer, or some old parts to put one together, you should look into make a little linux web server. i did that with my old old 333mhz. works perfect. plus it does all the php, apache, mysql setup for you.. not that you need it, cuiz you've prolly already got your windows one going there. but cool none-the-less Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584426595 Share on other sites More sharing options...
matt74441 Posted August 25, 2004 Share Posted August 25, 2004 Very nice guide (Y) For those of you that want a very quick web server setup on a Windows machine, you should go here (1.7 is the newest version): http://easyphp.org/telechargements.php3 Keep in mind that this isn't the newest version of everything. There are great setup instructions here: http://www.canowhoopa$$.com/guid...php/install.php (Replace $'s with s's) I'm all for setting up a webserver like b0b has shown you, but this is great for people who don't have the time, or if they are a little intimidated with the way b0b has shown us. I'm using this on my current webserver and it works flawlessly. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584426998 Share on other sites More sharing options...
Ultra Frosty Posted August 25, 2004 Author Share Posted August 25, 2004 The packages are good if you are completely lost by my tutorial, but if something in the package goes out of date (Apache, PHP or MySQL), you usually have a problem trying to upgrade just one. Also, if you find out that you don't need something later on, you can uninstall just that component. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584429501 Share on other sites More sharing options...
Paradoxcydal Posted August 25, 2004 Share Posted August 25, 2004 hmm i can use this :p i"hey how do i do that.." ----> /me gives link :blush: :devil: thnx :devil: Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584429801 Share on other sites More sharing options...
vhane Posted August 25, 2004 Share Posted August 25, 2004 I find it easier to install Apache, MySQL and PHP on FreeBSD than on Windows. It's easy when you have the FreeBSD ports system. Since it's source-based, you don't lose any flexibility: you can still select the relevant compile-time options. If you use the ports, you can also upgrade the relevant ports whenever new versions come out - without having to reinstall anything manually. To install apache-modssl, mysql, and mod_php4: 1) Install MySQL first via the ports: cd /usr/ports/databases/mysql40-server make install clean This will automatically download the latest sources for the mysql40-server port, compile and install it. 2) Install apache-modssl: cd /usr/ports/www/apache13-modssl make make certificate Follow the prompts to create the certificate. To remove the pass phrase from the RSA key so that we don't need to type in the pass phrase everytime we reboot the server: cd /usr/ports/www/apache13-modssl/work/apache_1.3.29/conf/ssl.key/ openssl rsa -in server.key -out server.pem Go back to the port directory to continue the install: cd /usr/ports/www/apache13-modssl make install make clean 3) Install PHP: cd /usr/ports/www/mod_php4 make install clean Choose from the compile-time options that come up: ssl support and mysql support. Select anything else that you need and carry on with the install. 4) Edit the Apache configuration file /usr/local/etc/apache/httpd.conf Add these lines in the file: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584430023 Share on other sites More sharing options...
rob2090 Posted August 25, 2004 Share Posted August 25, 2004 hey thank you I needed this one very bad :) Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584430053 Share on other sites More sharing options...
nX07 Posted August 25, 2004 Share Posted August 25, 2004 Thanks alot! :D Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584430207 Share on other sites More sharing options...
olajideolaolorun Posted August 25, 2004 Share Posted August 25, 2004 Well why would I want to start installing things that can kill my computer like EasPHP and other packed servers that are about 170+MB? When I can download The Uniform Server that is a small mini server and great for public and testing use. It is also under constant developing and very much less than 5MB unlike EasyPHP and others that are like 20-30MB? Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584430366 Share on other sites More sharing options...
Ultra Frosty Posted August 25, 2004 Author Share Posted August 25, 2004 Well why would I want to start installing things that can kill my computer like EasPHP and other packed servers that are about 170+MB? When I can download The Uniform Server that is a small mini server and great for public and testing use.It is also under constant developing and very much less than 5MB unlike EasyPHP and others that are like 20-30MB? For the same reasons as I stated in the above post. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584430453 Share on other sites More sharing options...
rob2090 Posted August 25, 2004 Share Posted August 25, 2004 hey can anyone help me, when I try to create a database in MySQL it tells me that access is denied for localhost. Any ideas ? Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584430754 Share on other sites More sharing options...
rayjin Posted August 25, 2004 Share Posted August 25, 2004 by doing a simple test using <? phpinfo(); ?>, MySQL is NOT working, only PHP is working, what am i missing? also, i'm a bit confused about step 9 in the tutorial 9. Double click on mysqladmin.exe and you will need to enter a username and password for your MySQL server. You will need to know this if you want to connect to your MySQL server remotely. is it suppose to be winmysqladmin.exe??? Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584431824 Share on other sites More sharing options...
vhane Posted August 26, 2004 Share Posted August 26, 2004 hey can anyone help me, when I try to create a database in MySQL it tells me that access is denied for localhost. Any ideas ? Somewhere in there is the answer to your problem :) http://dev.mysql.com/doc/mysql/en/Access_denied.html Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584434710 Share on other sites More sharing options...
Ultra Frosty Posted August 26, 2004 Author Share Posted August 26, 2004 hey can anyone help me, when I try to create a database in MySQL it tells me that access is denied for localhost. Any ideas ? have you launched winmysqladmin.exe ? If so, as long as you have the same IP address as the server, you can use ' root ' for a username (no quotes) and either leave the password blank or enter a space for a password. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584435804 Share on other sites More sharing options...
eSouL Posted August 26, 2004 Share Posted August 26, 2004 another package i find excellent --> AppServ Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584436009 Share on other sites More sharing options...
bubi Posted August 27, 2004 Share Posted August 27, 2004 What to do when you wanna use php mail()? Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584443428 Share on other sites More sharing options...
::Gomez:: Posted August 28, 2004 Share Posted August 28, 2004 How about php 5.0.1? Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584450807 Share on other sites More sharing options...
Ultra Frosty Posted August 29, 2004 Author Share Posted August 29, 2004 You can visit PHP.net and search for a function, and you find documentation on how to use mail();. PHP 5.0.1 is good, but it won't be mainstream for at least more 3 months. PHP5 supports better OOP, but somethings have changed that will give some scripts problems. I could have written this guide using PHP5, but if you have had the same amount of experience with web technology as I have, you would understand why I picked PHP 4.3.8. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584452236 Share on other sites More sharing options...
JustaPinoy Posted August 29, 2004 Share Posted August 29, 2004 THanks for the straightforward guide. I'm setting it up right now on my comp. Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584452392 Share on other sites More sharing options...
::Gomez:: Posted August 29, 2004 Share Posted August 29, 2004 You can visit PHP.net and search for a function, and you find documentation on how to use mail();.PHP 5.0.1 is good, but it won't be mainstream for at least more 3 months. PHP5 supports better OOP, but somethings have changed that will give some scripts problems. I could have written this guide using PHP5, but if you have had the same amount of experience with web technology as I have, you would understand why I picked PHP 4.3.8. Okey, i will install it with php 4.3.8 :) Thanks for the explanation! Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584454849 Share on other sites More sharing options...
mFC_ Posted September 13, 2004 Share Posted September 13, 2004 FoxServ is another package that can get the job done for you... found out about it a year or two ago when i wanted to test some crap on the road with my laptop, worked like a charm! Link to comment https://www.neowin.net/forum/topic/208285-installing-apache-php-mysql/#findComment-584551675 Share on other sites More sharing options...
Recommended Posts