Apache2+php4+mysql Configuration

Source: Internet
Author: User
Tags install php
1, install PHP: will download the PHP compressed file decompression, folder renamed to PHP copied to the C-packing directory.
2, open just unzip the PHP directory, you will find a file called "Php.ini-dist", this is the PHP configuration file, you need to rename it "PHP.ini", and then copy to the System directory winnt.
Modify PHP.ini It's important to note that
270 lines error_reporting = E_all & ~e_notice
277 Lines display_errors = On
Another: 365 line register_globals default off, change to on means open global variable, later programming convenience.
; Cgi.force_redirect = 1 changed to Cgi.force_redirect = 0 This is forced to not run in CGI mode
3, the PHP installation directory under the "Php4ts.dll" must be copied to the Windows system system32 directory
4, DLLs and extensions all the files in the catalogue to System32.
APACHE2 Installation
First stop your IIS or PWS service.
1 Run your downloaded Apache2 installation files, install Apache, installation process will prompt you to enter the host name, administrator mailbox, such as mailbox, this information after you install can be modified, so can be assured of input.
(* For future convenience, it is highly recommended that you change the installation path here to "x:" (Note x is your hard drive) or other names that conform to the 8.3 file name format, and you do not have to add quotes to the Apache installation path each time you enter it. When the system is successfully installed, a directory named "Apache2" is automatically created here, that is, the path to the actual Apache system files after installation will be the "x:apache2" directory. *)
After installation, under Apache2confhttpd.conf to find serveradmin, you can modify the administrator mailbox, (near 199 lines), 213 lines is servername I changed to localhost
Later I put the program in the Apache2 Htdocs under the subdirectory Zimulu, with http://localhost:81/zimulu/xxx.php test.
2 Editor Apache2/conf/httpd.conf
120 line Listen 80 to 81 port, because when your win2k is reset, IIS will take up 80 ports to avoid collisions, so Apache uses 81 ports.
The next 134-170 lines are the parts that load the module. In this section, add the following two sentences:
LoadModule Php4_module C:/php/sapi/php4apache2.dll
Note: If your PHP directory is not c:/php, please write it in the actual.
AddType application/x-httpd-php. php. php3. PhP4
(it is said that it can be added to the 768-line AddType Application/x-tar. tgz, but I did it once, but I didn't get it later.) Meaning: Load the PhP4 module, where the 2nd sentence if only AddType application/ x-httpd-php. PHP can only parse files for PHP extensions, and PHP3 extension programs cannot parse them.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.