| | |||||
| ||||||||
| Webmaster Tutorials Instructional webmaster-related how-to's and tutorials. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | HOWTO: Install the Apache Web Server, Perl, PHP, and MySQL on Windows This tutorial is old and you can find a more up to date version here or here. Code: //
//
//Tutorial by deadserious - © http://www.webdesigntalk.net
//© 2003 http://www.webdesigntalk.net
//REPUBLICATION OF THE TUTORIAL REQUIRES OUR PERMISSION.
//webmaster@webdesigntalk.net
//
//
//
Go to Start --> Run --> Type MSIEXEC in the input box and hit enter to see if it's installed and what version. You need to have atleast version 2.0. You will see a message box that says "Incorrect command line parameters", along with the version number. You can install or upgrade with the following downloads if you need to: Windows Installer 2.0 Redistributable for Windows 95, 98, and Me Windows Installer 2.0 Redistributable for Windows NT 4.0 and 2000: STEP 2: Download and install the Apache Web Server: http://nagoya.apache.org/dist/httpd/binaries/win32/ Download the latest stable release that ends with the .msi extension apache_2.X.XX-win32-x86-no_ssl.msi. Make sure the version you download has no_ssl or no_src in it. Click on the installation program you just downloaded until you see: Welcome to the installation Wizard for Apache HTTP Server 2.0.43 Continue through the set up, accept the license agreement, continue until you get to the screen that says: Server Information Please enter your servers information Enter "localhost" without the quotes in the Network Domain input box. Enter "localhost" without the quotes in the Server Name input box. Enter any email address you'd like to in the Administrator's Email input box. Click Next --> Click Next You'll have an option to change the installation to a different folder. Click Change Enter "C:" without the quotes for the folder name. Click OK --> Click Next --> Click Install --> Click Finish Apache should now be installed in the C:Apache2 directory. STEP 3: Configure Apache to enable some good stuff. Browser to the directory where the httpd.conf file is located: C:Apache2conf Open up httpd.conf with your favirote text editor and: 3A Search For: Options Indexes FollowSymLinks Replace With: Options Indexes FollowSymLinks MultiViews +Includes 3B Search For: AllowOverride None Replace With: AllowOverride All 3C Search For: ????: NamePros.com http://www.namepros.com/webmaster-tutorials/14519-howto-install-apache-web-server-perl.html DirectoryIndex index.html index.html.var Replace With: DirectoryIndex index.html index.html.var index.htm index.php index.shtml 3D Search For: <Directory "C:/Apache2/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> Replace With: <Directory "C:/Apache2/cgi-bin"> AllowOverride All Options ExecCGI Order allow,deny Allow from all </Directory> 3E Search For: AddType application/x-tar .tgz AddType image/x-icon .ico Replace With: AddType application/x-tar .tgz AddType image/x-icon .ico ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 Action application/x-httpd-php /php/php.exe 3F Search For: #AddHandler cgi-script .cgi Replace With: AddHandler cgi-script .cgi .pl 3G Search For: #AddOutputFilter INCLUDES .shtml Replace With: AddOutputFilter INCLUDES .shtml Jump down to step 7A to test and verify apache is working. STEP 4: Download and install Perl: http://activestate.com/Products/Down...?id=ActivePerl ActivePerl 5.8.0 build 804 Windows MSI 11.5MB. Click on the Perl installation file you downloaded and accept the license agreement and continue until you come to the screen that says: Custom Setup Select the way you want features to be installed Click the browse button and change the location from: C erl to: C:usr Click Next --> Click Next --> Click Next --> Click Install -->Wait for it to install --> Click Finish Jump down to step 7B to test and verify Perl is working. STEP 5: Download and Install PHP http://www.php.net/downloads.php Scroll down until you see Windows Binaries. Download the latest stable zip version and not the installer version. PHP 4.3.0 zip package. Unzip it to your: C: directory Browse to your: C: directory and look for the folder named php-4.3.0-Win32. This maybe be different if you downloaded a different version. Open up the php.ini-dist file located in the php-4.3.0-Win32 folder and: Search For: doc_root = Replace With: doc_root = "C:Apache2htdocs" Search For: extension_dir = ./ Replace with: extension_dir = "c hpextensions"Save the php.ini-dist file and rename it to: php.ini Now move the php.ini file into your: C:Windows directory. Find the php4ts.dll file located in your: C hp directory and move it to your: C:Windows directory.Rename the: C hp-4.3.0-Win32 folder to: phpJump down to step 7C to test and verify PHP is working. STEP 6: Download and Install MySQL http://www.mysql.com/downloads/downl....23.54-win.zip Unzip the file you just downloaded to a temporary directory. If your using a program such as Winzip and it gives you the option to install now go ahead and do that and choose all the default settings. If not browse to the temporary directory where you unzipped the files and click on the setup.exe file to start the installation. Continue through the installation with all the default settings until your done. Jump down to step 7D to test and verify MySQL is working. STEP 7: Test Everything: 7A: Test the Apache Web Server Start Apache You can start apache by going to the Start Menu -- > Apache -- > Start apache in console on Windows 98. This may be different for other versions. You'll see a little Dos like screen appear if your using Windows 98 Open up a text file and throw some HTML in it: Example: <html> <body> Apache Web Server Test </body> </html> Save it as index.html in your C:Apache2htdocs directory. This is where all your html, graphics, and php files will go. Go to http://127.0.0.1 or http://localhost in your favirote browser and see if it works. Note: You can stop apache on Windows 98 by double clicking in the little black dos box and Pressing Ctrl+C 7B: Test Perl / CGI Open up a text file and place some code in it: Example: #!/usr/bin/perl print "Content-type: text/htmlnn"; print "Hello Perln"; Save it into your C:Apache2cgi-bin directory as: perltest.cgi Go to http://127.0.0.1/cgi-bin/perltest.cgi and see if it works. 7C Test PHP: Open up a text file and add the the following code to it: <?php phpinfo(); ?> Save it in your C:Apache2htdocs directory as phpinfo.php Browse to: http://127.0.0.1/phpinfo.php and see if it works. 7D Test MySQL: Browse to your C:mysqlbin directory and Click on the winmysqladmin.exe file. This should launch a graphical user interface that you can use to edit configuration files, and maintain and monitor your MySQL server. You should see a screen with: Create the mysql.ini file with default values and the user below. Reccomended to novice user. Enter a username and password that you will remember Click Ok. You'll see a stoplight icon in your taskbar You can stop the MySQL server and/or the WinMySQLAdmin tool by right clicking on the icon. To login to the MysQL server from the command line: Go to the Start menu -- > selct run. Type dosprmpt in the input box to open up the command-line interface, or if that doesn't work try typing cmd in the input box. That should open up a dos like screen. ????: NamePros.com http://www.namepros.com/showthread.php?t=14519 Change your directory to the bin directory of MySQL by typing: cd c:mysqlbin And pressing enter. Now you can type mysql and press enter to start the MySQL monitor. You should see something like: Welcome to the MySQL monitor. Commands end with ; or g. and some more stuff. If you see that then you know MySQL is working. You can use the MySQL administration tools like mysqladmin and mysqldump from the command-line to create, drop, dump, and restore databases and alot more. To get a complete list of mysqladmin commands type the following at the prompt: #prompt> mysqladmin --help If you plan on running scripts that connect to a MySQL database you usually need to enter a database name in the config file of the script. If you just make up a name and run the install file for the script, it may create the database for you. If not you can either use the database name: test, or create one using the mysqladmin tool. You don't need to enter a username or a password in the config file. You can use localhost as the database hostname or server name. Okay that's all for now, I'll try and update this tutorial every so often, so keep checking back for updates!.
Last edited by deadserious; 06-19-2005 at 11:33 PM.
|
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | Cool, glad to see you got everything working. ![]() I've never installed frontpage on windows with apache, so I really don't know if it will work or how to do it, but if it will work it's probably easy to install. This link may give you somewhere to start: http://support.microsoft.com/view/tn.asp?kb=300004 |
| |
| | #4 (permalink) | ||||
| New Member Join Date: Sep 2003
Posts: 9
![]() |
<Directory "C:/Apache2/cgi-bin"> AllowOverride All Options None Order allow,deny Allow from all </Directory> ????: NamePros.com http://www.namepros.com/showthread.php?t=14519 Should I still replace it? | ||||
| |
| | THREAD STARTER #11 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | Well when you go into the folder and click on the file, that's just like opening up the file from your desktop or any other folder, it's not running it on the server. It should work as http://localhost/index.html or http://127.0.0.1/index.html in your browser if you're using an up to date browser like IE6. If you still can't get it working that way then I would say try and reboot your computer and see if it starts up by default and/or try stopping and restarting the service with the little service manger in your system tray and then try again and let us know if it works or not. |
| |
| | THREAD STARTER #13 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | Have you intalled the XP Service Pack 1: http://www.microsoft.com/windowsxp/p...p1/default.asp If not, then you'll need to install that in order for it to work. Also you may try going to your Start menu >Slect Run > Type "cmd" without the quotes in the input box to open up the command line interface, if that doesn't work, type "dosprmpt" instead. Then type the following commands pressing enter after each one: ????: NamePros.com http://www.namepros.com/showthread.php?t=14519 net stop apache net start apache Try them things for now and let us know if any of it worked and we'll go from there. Also do you have any type of firewall running? |
| |
| | THREAD STARTER #15 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | It looks like there has been some problems with apache 2.x and zone alarm: http://www.apache.org/dist/httpd/bin...32/README.html It may be that you have another service like IIS running on port 80. If you can determine if you have IIS installed and if it's running and then stop it that would probably solve the problem. Possibly check Start->Administrative Tools->Services and look for World Wide Web Services and make sure it's stopped and set it to manual start up. |
| |
| | THREAD STARTER #17 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | You say apache is responding or do you mean it's running? If you still haven't got it working you may try running it on a different port. Try editing your httpd.conf and search for "Listen 80" or something similar and change it to "Listen 8080" and then searching for "ServerName 127.0.0.1:80" and changing it to "ServerName 127.0.0.1:8080." Then try restarting the server and calling up your index.html file at http://127.0.0.1:8080 or http://localhost:8080. But, of course, make sure that you create the index.html file first. ????: NamePros.com http://www.namepros.com/showthread.php?t=14519 If that don't work I would probably try uninstalling the 2.x.x.x version and installing 1.3.27 or 1.3.28 and see if one of them works our for you. Also if you still can't get it working if you want zip up your httpd.conf and attach it here so we can look at it. |
| |
| | #18 (permalink) |
| New Member Join Date: Sep 2003
Posts: 11
![]() | the same Hi! I have the same problem with starting Apache on Windows XP. I will try the things that you said. But I've tried the most of them but...we will see. I thought that it is from my computer but after i've read that other persons have the same problem i think that there is just something specific on this Windows.
__________________ ;) |
| |
| | #22 (permalink) |
| New Member Join Date: Sep 2003
Posts: 11
![]() | ...but now i can;t make php to work...:( Php is making problems....I have dreamweaver mx on my pc and when i'm writting a php file it goes to open the page with dreamweaver mx...but it opens just a white page....when i'm writting forms in html and i'm using php....it's doing strange things too...i'm writting the asked information in the form and when i submit....it's not showing me the expected result... It shows me a part from the php code.... what i must do?i need php very urgently because i'm doing a project and i must finish it before december. ;(
__________________ ;) |
| |
| | THREAD STARTER #23 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | Since you installed a 1.3.x version the configuration will be a little different and you can install PHP as an apache module. Here's some instructions below that should help you get it up and running. Download and Install PHP http://www.php.net/downloads.php Scroll down until you see Windows Binaries. Download the latest stable zip version and not the installer version. PHP 4.3.0 zip package. Unzip it to your: C: directory Browse to your: C: directory and look for the folder named php-4.3.0-Win32. This maybe be different if you downloaded a different version. Open up the php.ini-dist file located in the php-4.3.0-Win32 folder and: Search For: doc_root = Replace With: doc_root = "C:Apachehtdocs" <-- Replace this with your actual path to your htdocs directory. Search For: extension_dir = ./ ????: NamePros.com http://www.namepros.com/showthread.php?t=14519 Replace with: extension_dir = "c hpextensions"Save the php.ini-dist file and rename it to: php.ini Now move the php.ini file into your: C:Windows directory. Make sure the files php4ts.dll and php4apache.dll are located in your C hp-4.3.0-Win32 directoy. If they are not there you should be able to find them in one of the subdirectories (ex: C hp-4.3.0-Win32sapi) and copy them from there into C hp-4.3.0-Win32 Rename the: C hp-4.3.0-Win32 folder to: phpConfigure Apache 1.3.x to run PHP Open up your httpd.conf file located in your conf directory and Search For: #LoadModule unique_id_module modules/mod_unique_id.so and add this right below it: LoadModule php4_module "c:/php/php4apache.dll" Search For AddModule mod_setenvif.c and add this right below it: AddModule mod_php4.c Search For: AddType application/x-tar .tgz and add this right below it: AddType application/x-httpd-php .php You can create a file named info.php located in your htdocs directory with the following code to test it: <?php phpinfo(); ?> Start apache and browse to: http://localhost/info.php |
| |
| | #24 (permalink) | ||||
| Senior Member Join Date: May 2003
Posts: 2,187
![]() ![]() ![]() |
iis is avalible in xp, go to ad and remove and select the windows components thingy bob and its in there it doesnt get installed by default | ||||
| |