Some supplements for installing Apache and PHP, a very practical article _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
A practical article on how to install Apache and PHP. AnywhereliuxiLzl@163.netPHP installation steps, there are a lot of information online, are very detailed. However, the installation of free software such as Apache and PHP does not have a friendly Anywhere liuxiLzl@163.net as commercial software does.
PHP installation steps, there are a lot of information online, are very detailed. However, since the installation of free software such as Apache and PHP does not have a friendly user interface as the commercial software does, many netizens rarely encounter such a kind of stuff, even though there is a copy of installation information next to it, but there are still many problems. On many forums in China regarding Linux and php, I also noticed similar questions from many netizens. Therefore, I have written out the solutions to these problems that I know. if they are not correct, please point them out.
1. installation of free software, whether in Win32 or Linux, usually has README. read it carefully before installation, there will be a lot of gains.
II. install Apache
This step should be relatively simple. as long as you remember to set BindAddress, ServerName, and DocumentRoot in httpd. conf, you should be able to see the familiar Apache icon. BindAddress refers to the IP address that can be answered. it can be *, an IP address, or a complete domain name. ServerName is the host name. if there is no domain name, you can use an IP address. DocumentRoot is the default home page. After modifying httpd. conf, remember to restart Apache.
3. install PHP
There are many problems in this step. in the final analysis, there are two reasons: one is that PHP does not work, because httpd. the configuration of PHP in conf is incorrect. Another problem is that PHP is started, but there is an error when running the php file. this is because PHP. ini is not set.
1. httpd. conf settings
In win32, these rows cannot be fewer.
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 indicate the file suffix to be interpreted by the PHP script.
If it is not PHP4 but PHP3, change "application/x-httpd-php" to "... httpd-php3", remember.
If the preceding two rows are not set, the PHP file will be downloaded or displayed on the page.
In Linux, if PHP runs as an Apache module, you only need to add the third line. However, you should pay attention to the steps when installing PHP first, after configure Apache, add -- activate-module = {libphp4.a path}, and then make, make install ......

Http://www.bkjia.com/PHPjc/629537.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/629537.htmlTechArticleAnywhereliuxiLzl@163.net PHP installation steps, there are a lot of information online, are very detailed. However, the installation of free software such as Apache and PHP is not as friendly as that of commercial software...

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.