How to Install PHP 4 and Apache 1.3.xx in Windows

Installing Apache 1.3.xx for Windows and configure it for use with PHP 4, a fairly simple task, if you have done it before. You do not need to compile Apache and PHP sources as readily available binaries for Apache and PHP.
Installing PHP4 and Apache 1.3.xx in Windows
Before installing, make sure that the username under which you are working is part of the Administrators group. Make sure that the 80-th the TCP-port is not occupied by any other service or application, eg, Microsoft IIS. If port 80 is not available, change the port in IIS-a setting (or other services) on the other, or else disable or uninstall the application.
Installing PHP4 and Apache 1.3.xx in Windows
For distribution Apache 1.3.xx, refer to the Apache download page of our portal (Download / Apache), or download the binary installation package (* .msi) from the Apache HTTPD project mirrors the official site here. Select the package file that has a name similar apache_1.3.xx-the win32-the x86-no_src.msi (where xx -Current version of Apache).
Immediately after receiving the Apache, install it, the installation process is trivial and does not have any complicated features. Pay attention to the Apache installation path (the Destination the Folder), Treat the choice of the directory for your Apache installation with attention. However, we will consider configuring Apache and PHP on the example of the default installation directory:
CD “C:/Program Files/Apache Group/”
After installation is complete, you can begin to install PHP4.
Installing PHP4 and bundle it with the Apache 1.3.xx
Download the archive PHP4 binary files (files *.zip) the latest stable version, please contact either of our PHP page downloads (Download / PHP), or to the download page on the official website of the PHP (php.net). Do not download PHP in the form of installation packages (such as *.msi), they will not help you in this situation.
PHP4 downloaded as *.zip archive? Then we continue. Open the root directory of your Apache, by default it should be:
C:/Program Files/Apache Group/Apache/
Create a subfolder in the root Apache PHP directory. For example:
CD“C:/Program Files/Apache Group/Apache/PHP/”
Installing PHP4 and bundle it with the Apache 1.3.xx
Download the archive PHP4 binary files (files *.zip) the latest stable version, please contact either of our PHP page downloads (Download / PHP), or to the download page on the official website of the PHP (php.net). Do not download PHP in the form of installation packages (such as *.msi), they will not help you in this situation.
PHP4 downloaded as *.zip archive? Then we continue. Open the root directory of your Apache, by default it should be:
C:/Program Files/Apache Group/Apache/
Create a subfolder in the root Apache PHP directory. For example:
CD“C:/Program Files/Apache Group/Apache/PHP/”
Extract the files from the archive PHP4 * .zip in PHP created a subdirectory. And pay attention to two very important file: php.exe, php4ts.dll, they will have to be precisely established directory you / the PHP. In addition, locate the file php4apache.dll, this file must be located in a subdirectory of / the PHP / sapi /. If these files are present, all right, you can start configuring.
Now stop your Apache team (use the Start -> Run):
NET STOP Apache
Now, open the Apache configuration file, which has the name of the httpd.conf. By default, it is located in a subdirectory of the conf:
C:/Program Files/Apache Group/Apache/conf/
Open the Apache configuration file (the httpd.conf) in the “Notepad” and add the following lines (add this directive after a long list of such directives how the LoadModule):
LoadModule php4_module “C:/Program Files/Apache Group/Apache/PHP/sapi/ php4apache.dll”
Next, locate the Apache configuration file the following directive:
DirectoryIndex index.html
And change it to:
DirectoryIndex index.Php index.phtml index.php4 index.html index.htm index.shtml
Next, you need to compare the extension .php, adding httpd.conf the following directive (add it to the AddType directives district):
AddType application/x-httpd-php .php
Now create a directory in which to store your documents and scripts (.php and .html files). Suppose it is a catalog:
C:/www/
Now find the directive DocumentRoot and change its value to the following:
DocumentRoot “C:/www”
Thus, in the directory C: /www/ will be placed in your .html pages and .php scripts. Create directories:
The C:/the www/the cgi/
The C:/the www/the cgi-bin directory/
They will be stored script .cgi (including binary). Next, install the directives ScriptAlias ??follows:
The ScriptAlias ??/the cgi/”the C:/the www/the cgi/”
The ScriptAlias??/the cgi-bin directory/”the C:/the www/the cgi-bin directory/”
And replace it with the following:
the Options the Indexes Includes
the AllowOverride the All
the Allow from all
So you asked a number of default settings to the directory C: / www and all its subdirectories. Namely, the automatic generation of a list of the contents of the directory when viewing it in the browser (if it is not needed, simply select the Options Includes), support to the SSI, as well as the ability to share files .htaccess for individual directory settings.
Next, make sure that you have the directive the AddHandler:
AddHandler .cgi .exe
This directive tells Apache that files with the extension .cgi and .exe should be taken as the CGI-program.Set the SSI parameters:
Text AddType / the html .shtml .shtm .stm
the AddHandler server-parsed .shtml .shtm .stm
These directives files with the extensions .shtml .shtm .stm and will be treated as the SSI. Now save your configuration file the httpd.conf. But now you need to install the PHP configuration file (the php.ini) in the root directory of Apache. The default is:
C:/Program Files/Apache Group/Apache/
The configuration file php.ini can be found in the archive * .zip downloaded PHP you, and if it is not there that often, then download the php.ini, here .
Once you have copied the php.ini in the root directory of Apache, you need to make to configure PHP. First, create a PHP directory (the default directory is the C: / Program the Files / Group is the Apache / the Apache / PHP) Two new subdirectory:
The C:/Program the Files/Group is the Apache/the Apache/the PHP/the PECL/
The C:/Program the Files/Group is the Apache/the Apache/the PHP/sessions/
Create a directory for the libraries needed extensions PECL and store session files respectively. Now open the configuration file php.ini and find the Directive responsible for the path to the extensions:
extension_dir = “put_k_rasshireniyami_php”
Set this value according to the location of the directory / the PECL. That is, in this case:
extension_dir=”C:/Program Files/Apache Group/Apache/PHP/PECL”
Now find a directive that is responsible for the path to the session files:
session.save_path=put_k_hranilischu_sessy
Set the value of this directive in line with the location of the directory /sessions. In this case, the default is:
session.save_path=C:/Program Files/Apache Group/Apache/PHP/sessions
Now save the file to the php.ini, accepting change.
In this configuration of Apache + PHP completed. It’s time to test your server. Create a directory C: / www / file index.php
Now run your Apache with the following command (also use the Start menu -> Run):
NET START Apache
Now open your browser and ask your server:
http://localhost/
If you did everything correctly and your Apache web server is running, you will see information about PHP.
Recent Posts
Categories
News
- Aress Software Achieves AWS Standard Consulting Partner Accreditation
- 24x7hostingsupport.com is rebranded as Aress.Support
- Successful Participation by Aress in HostingCon 2015
- Successful participation of Aress in SITS LONDON, 2015 – The IT Service Management Show
- Aress Software Appraised at CMMI Level 3
Recent news
Feb 05, 2019
Aress Software Achieves AWS Standard Consulting Partner Accreditation
Aress Software a leading Software Development and 24x7 Technical Support Service company has announced that,… Read More
Blog post
Apr 08, 2022
5 Benefits of Outsourcing Cloud Server Management Services
Technology is changing the way organizations carry out their business. Data is now a priority,… Read More