Complete PHP Manual

Source: Internet
Author: User
I. PHP installation and setup can be run in multiple control systems. The current control systems are divided into two types: Windows series and UNIX series. There is a big difference in installing and setting the PHP runtime environment in the control systems of the two series. Next, install and set the PHP
PHP can run in a variety of control systems. The current control systems are divided into two types: Windows and UNIX.
There is a big difference in installing and setting the PHP runtime environment in the control systems of these two series. The following is a description of the differences.
#2 (1) installation settings for UNIX-like control systems
Currently, the two popular categories of free UNIX-like control systems FreeBSD and Linux are popular, and there are many types of Linux systems, such as RedFlag and RedHat. FreeBSD has only one type. Currently, its Release version is 3.5. Here we take FreeBSD as an example to introduce the PHP installation and setting process in UNIX-like control systems. Linux and FreeBSD are similar.
1. install
First go to www.php.net to download the PHP installation file and http://www.apache.org to download the Apache WEB server. Put the downloaded file in the/usr/directory.
Next, start to install the settings. if you do not understand the meaning of these parameters, do not change them.
Install Apache and PHP first.
Tar-vzxf apache_1.3.x -- x indicates the version number, such as 12 or 13.
Tar-vzxf php-4.0.x or tar-vzxf php-3.0.x
Cd apache_1.3.x
./Configure -- prefix =/www --/www indicates that the installation directory is under the root directory www
Cd ../php-4.0.x or cd ../php-3.0.x
./Configure -- with-mysql -- with-apache = ../apache_1.3.x -- enable-track-vars
Make
Make install
Cd ../apache_1.3.x
PHP3:./configure -- activate-module = src/modules/php3/libphp3.a
PHP4:./configure -- activate-module = src/modules/php4/libphp4.a
Make
Make install
The first and second lines use tar to decompress the downloaded compressed file to a directory with the same name, and then set the environment under the Apache decompressed Directory. the -- prefix option indicates the installation directory path of Apache. However, if the PHP environment is set in the decompressed directory of PHP, the -- with-MySQL option can be omitted if the mysql database is not applied, but the -- with-apache option must be included, the directory name for Apache decompression must be accurate. After setting PHP, compile and install it to the specified directory of Apache. Then, in the Apache decompression Directory, install the PHP mode Library, compile and install Apache, and then complete the installation. The next step is to set Apache to make the Web Server operate smoothly.
2. set
First, set the php. ini file,
Cd ../php-4.0.x or cd ../php-3.0.x
PHP3: cp php3.ini-dist/usr/local/lib/php3.ini
PHP4: cp php. ini-dist/usr/local/lib/php. ini
Readers can compile INI files to meet their own requests. of course, if you do not understand the settings, the default settings will be applied. readers can also specify another directory, but you need to set the condition in step 6 -- with-config-file-path =/path and then set the Apache server. you need to set the condition in the Apache configuration file httpd. conf or srm. in the conf file.
PHP 3: AddType application/x-httpd-php3. php3
PHP 4: AddType application/x-httpd-php. php
You can also set another extension name as the php file name.
#2 (2) Windows installation

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.