Jump to content
xisto Community
Sign in to follow this  
Raidation

Set Up A Web Server On Your Pc

Recommended Posts

I wrote this tutorial a long time ago, but it still works, and is still useful.

Download the PHP 5.3 VC6 x86 Thread Safe ZIP package. That's the most complete one.

But if you do install PHP, then you also need to install Apache
Don't download from a mirror. Download directly from their site.
Go to the Win32 Binary without crypto (no mod_ssl) (MSI Installer) option for Apache 2.2.11
And install Apache server.
When you get to the server information, you don't need that, so just type in anything you want.
And install.

Then, you need to install MySQL.
Choose the package that fits you and use the MSI Installer.
When you're installing, choose the following options:
-Detailed Configuration
-Developer Machine
-Non-Transactional Database Only (that is, if you're not selling or buying)
-Decision Support
-Enable TCP/IP Networking and Uncheck Strict Mode. And Check Add Firewall Exception.
-Best Support for Multilingualism
-Check Install as Windows Service and choose MySQL. And also check Launch Automatically. And include the Bin directory in Windows PATH.
-Uncheck Modify Security Settings
-And finally, press Execute.

If everything is perfect, then it should start. If not, then go to your Start Menu > MySQL > MySQL Server 5.1 > MySQL Server Instance Config Wizard

And ReConfigure with the same settings above.

Well, now that we have the installing done, time to go back to PHP. You shouldn't have done anything with that ZIP package yet. Now you need to make a folder called PHP in your C:\ Drive and extract all the files into that folder.

In your PHP folder, look for a file called php.ini-developer. Rename it to php.ini (sound familiar?).
Look for the line that starts with doc_root. Give it the value "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs" with the quotes if you installed Apache in the default directory.
Now, after that, look for the line that starts with extension_dir and give it the value "C:\PHP\ext" with the quotation marks, of course.
Now go to the lines that have the word "extension" preceded by a semi-colon and followed by a dll name.
Remove the semi-colon from the line that says ;extension=php_mysqli.dll
That will be your MySQL extension. Don't remove the semi-colon from ;extension=php_mysql.dll
The "i" in mysqli means improved.
You're almost done.
Look for session.save_path
Make sure the line does NOT precede with a semi-colon. Give it the value "C:\WINDOWS\Temp" or whatever your computer's temporary directory is.
Now you're done with the php.ini file.

Next, you have to set up Apache's httpd.conf file.
Go into your C:\Program Files\Apache Software Foundation\Apache2.2\conf directory and look for the file httpd.conf
You can edit it only if you're an Administrator, so if you're not, edit it as an Administrator.
Fortunately for you, all that confusing code has already been made by the installer, so you're okay there.
Look for:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
And after index.html, add index.php
Then, add this to the VERY END of the file:

LoadModule php5_module "C:/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/PHP"

And that's it.
Next to update your MySQL server (I know, it's tiring. I don't know how long this tutorial is so far. All I know is that I'm tired.).
Go into command prompt. If you don't know how to do that, then... I can't help you.
Type in the command:
mysqladmin -u root -p password "Type in new password here with the quotation marks"

Then, you will be prompted to enter in your old password. Just press enter.
Then, you're done with MySQL.

Now, back to Apache. If Apache is running, you should see a new icon in your toolbar. It should either have a red dot or a green arrow in it. Now right click it and restart it. Wait until it changes into a green arrow in the middle, then right click on it and click on Open Apache Monitor. If everything is working fine, then at the bottom, it should have the line PHP 5.3.0 or something there.
If you had the red dot, then just click (not right click) on it and start apache services. Wait until it changes to a green arrow, then do the steps above.

Now you're done.

Your server's root directory should be C:\Program Files\Apache Software Foundation\Apache2.2\htdocs


Have fun.
:P
Edited by Raidation (see edit history)

Share this post


Link to post
Share on other sites

say, for this i prefer using zend here or xamppplus mysql + navicat for mysqlanywaywhich one better?aren't zend, xampp, wamp, just same thing?

Share this post


Link to post
Share on other sites

Hi!

Although Zend, Xampp, and Wampp consist of the same packages (they bundle the software, add an installer, and give it a name!), I'm guessing that Zend may have made modifications to the source code of the open-source packages. That's actually the beauty of open-source - you can take the source code, modify it to build something better and release it as a different flavor of the product - that's how Linux ended up getting so many different names!

In addition, as the previous poster has mentioned, Xampp and Zend are available on platforms other than Windows too, while Wamp is limited only to Windows. In fact, Xampp targets Windows, Linux, Mac OS X and Solaris. I can't tell you much about Zend but I'm pretty sure that they have a Windows version and a Linux version, at the least.

say, for this i prefer using zend here or xamppplus mysql + navicat for mysql

anyway
which one better?
aren't zend, xampp, wamp, just same thing?


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.