Install Apache and PHP with some supplemental _ servers

Source: Internet
Author: User
Tags file upload install php php script win32

The installation of free software, whether in Win32 or Linux, usually have a readme, before installation, read carefully, there will be a lot of harvest.
Second, the installation of Apache
This step should be relatively simple, as long as you remember to set httpd.conf inside the bindaddress, ServerName, DocumentRoot, you should be able to see the familiar Apache icon. Bindaddress refers to the IP address that can be answered, can be *, IP address, or can be a complete domain name. ServerName is the host name, if there is no domain name, you can use IP. DocumentRoot is the preset home page location. Remember to restart Apache after modifying httpd.conf.
Third, the installation of PHP
The problem is more, in the final analysis is two reasons, one is that PHP does not work, this is because httpd.conf about the PHP part of the settings have problems; Another problem is that PHP started, but ran PHP files when there are errors, because the php.ini is not set up.
1, the httpd.conf setting
Under the Win32, these lines are not less
scriptalias/php "D:/php/php.exe"
Action application/x-httpd-php "/php"
AddType application/x-httpd-php. php. php3
The first two lines indicate the location of the PHP script interpreter, and the third line indicates the file suffix to be interpreted by the PHP script.
If not PHP4 but PHP3, change "application/x-httpd-php" to "... httpd-php3", remember.
If the first two lines are not set up, there will be downloads or a page showing the PHP file.
In Linux, if PHP is in the Apache module, then only add a third line can be, but in the installation should be aware of the steps, you must first install PHP, after configure Apache, to add--activate-module={ libphp4.a path}, then Make,make install ...
If you want to support preset index.php This kind of thing, but also find this sentence: Directory Index index.html, followed by index.php index.php3 ...
After the completion of these steps, write a PHP program, should have a result, hehe.
2, the php.ini setting
After a lot of users installed PHP, always appear
"X-powered-by:php/4.0.0 Expires:thu, Nov 1981 08:52:00 GMT Cache-control:no-cache, post-check=0, pre-check=0 Pragma: No-cache content-type:text/html "
This kind of thing, the first time I install PHP4 also have this phenomenon, at that time because PHP4 just come out, the information on the net is very few, oneself Blind Mongolia changed well. As long as you put
; Windows Extensions
This section is annotated with a semicolon, which can be solved because PHP4 already contains support MYSQL,GD and so on, unlike PHP3, which includes these DLLs under Win32.
In addition to this problem, there are like session, file upload and other issues, such issues can refer to phpinfo () the implementation of the results to find reasons, generally are not set the path, As long as in the php.ini to find the appropriate settings section, to see what is not set up, fill on on it, there are very detailed English notes.

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.