Let's start with the installation Apache (HTTP server). You can download Apache installation at www.apache.org download the version you like, I recommend version 2.
Here is the link to it.
For faster downloads, visit.
After downloading the file .msi installer (), run it. The installation wizard follows, next, finish "work" …
The installer will ask you for some details like the name server of your server, your server address and administrator email address. If you have a domain name or hostname, enter the information like this:
Server Name: your_domain.org
Server Address: www.your-domain.org
Admin E-mail: This email address is protected from spambots. You need JavaScript enabled to view it..
if you don't have one, you should get a free address at:
Check the option 'runs as a service for all users on port 8080 ' and click the button Next,, Done, to finish the installation. Advice: Install it on disk C: (it creates a folder for it, don’t worry), to ensure that you set it up easier. When you're finished, open your browser and type in the address bar:
HTTP://localhost/
If you see "Test Page for Apache Installation", everything is working.
Installing PHP:
Let's install PHP. download archives from www.php.net. Here’s a direct link to Version 4.3.9:
Make sure to download the archive and not the installer. OK! After downloading it, unpack the archive into C:/PHP (this is for simplifying the path). Now open C:/apache/conf/httpd.conf and find this line:
#LoadModule Ssl_module модули/mod_ssl.so
under this line, add this:
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php4_module "C:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
Now search for this line:
Directory "C:/apache2/htdocs"
Now change it to:
Options Indexes FollowSymLinks
#
# AllowOverride управляет тем, что директивы могут быть помещены в файл .htaccess.
# Это не может быть «Все», «None», или любая комбинация из ключевых слов:
# Опции FileInfo AuthConfig Лимит
#
AllowOverride None
to:
Options Indexes Includes FollowSymLinks MultiViews ExecCGI
#
# AllowOverride управляет тем, что директивы могут быть помещены в файл .htaccess.
# Это не может быть «All», «None», или любую комбинацию из ключевых слов:
# Опции FileInfo AuthConfig Лимит
#
AllowOverride All
This will enable ..htaccess support on your server and ensure that you can see the folder contents without getting 403 Forbidden errors.
Now search for:
DirectoryIndex index.html index.var.html
and change it to:
DirectoryIndex index.html index.php
Save the file and restart Apache. (you can restart it by clicking the restart server Apache shortcut in the menu Start or by typing:
Clean Apache restart
in the command window. OK!
you have PHP working on your server. Now let’s configure PHP and make sure it’s really working! Open C:/php/php.ini (php.ini distance renamed) and search for this item:
max_execution_time = 60; Maximum execution time of each script, in seconds max_input_time = 60; Maximum time each script can spend parsing input data memory_limit = 5M; Maximum amount of memory a script may consume (8 MB)
You need to change this to whatever you want. here the option I use is:
max_execution_time = 300; Maximum execution time of each script, in seconds max_input_time = 300; Maximum time each script can spend parsing input data memory_limit = 5M; Maximum amount of memory a script may consume (8 MB)
Now search for:
register_globals = Off
and change it to:
register_globals = On
Search:
extension_dir = "./"
and change it to:
extension_dir = "C:/PHP/extensions"
if you installed PHP in C: …
Search:
, Windows
extensions; Note that MySQL ODBC and support are now built-in, so no DLLs are required for this.
and uncomment (remove the; in front of) the following modules:
extension=php_bz2.dll
extension=php_db.dll
extension=php_gd2.dll
extension=php_java.dll
extension=php_msql.dll
extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_sockets.dll
OK! Now let's change the SMTP settings Search (this is good for your mail () you need this!!!)
[mail]; For Win32 only.
SMTP =
smtp_port = 25
; For Win32
only.; Sendmail_from =
and changes to:
[mail]; For Win32 only.
SMTP = mail.isp.org
smtp_port = 25
; For Win32 only.
Sendmail_from = [email protected]domain.org
if you do not have a mail server or:
[mail]; For Win32 only.
SMTP = local
smtp_port = 25
; For Win32 only.
Sendmail_from = [email protected]domain.org
if you have a mail server …
Save the files. Now let's complete the installation PHP. copy all DLL files from C:/PHP/libraries to C:/Windows/System32. copy C:/php/php4ts.dll to C:/Windows/System32/ and copy php.ini from the folder PHP to windows and system32. Restart Apache.
save this file in the HTDOCS folder (C:/Apache/HTDOCS) as info.php and open the browser. in the address bar write:
HTTP://localhost/info.php
You should see the PHP configuration in the table. The looong file can optionally install Zend Optimizer. I use it … it doesn’t need a tutorial. Install pear modules for PHP, just run the pear batch from the PHP folder and double-click the reg file to finish installation
