Php5.4.3 installation tutorial PHP5.4.x has been released for some time. the latest version is 5.4.3. The webmaster has not been upgraded to this version, and it is recommended that you still use version 5.3.x. The reason is that php5.4 has just been released, and its modification frequency must be large, and php has not officially released the windows platform msi installation program, while php5.4.3 installation tutorial
PHP5.4.x has been released for some time. the latest version is 5.4.3. The webmaster has not been upgraded to this version, and it is recommended that you still use version 5.3.x. The reason is that php5.4 has just been released, and its modification frequency must be relatively high, and php has never officially released the windows platform msi installer, but provided a compressed package. To some extent, this shows that php's official release of php5.4 is not complete.
However, the webmaster also found that someone has been searching for Php5.4.3 installation tutorials on the network. it must be a compressed package that needs to be manually configured, causing inconvenience to everyone. This is why I suggest you use php5.3, on the windows platform, you can download the installer for installation, which is very convenient. As for linux, it doesn't matter, because it needs to be compiled and installed.
The installation process of php5.4.3 is as follows:
1. download the zipzip package at http://windows.php.net/download/and decompress the source code of the compressed package to a folder, for example, at PHP
2. open the D: \ php directory and set php. rename ini-production to php. ini, which is officially recommended for php. ini, because its settings have been optimized.
3. despite the previous optimization, you still need to manually configure some additional information, enable php. ini, and configure the following information.
Extension_dir: the directory where php loads Extensions. by default, the ext folder under the php installation directory is used. ini: find this configuration item and remove the semicolon before it. after modification, it is shown as extension_dir = "ext"
Extension = xxxxx. dll: open the extension library to be loaded, search "Dynamic Extensions" in php. ini, and then flip down. you will find many lines, such:
; Extension = php_bz2.dll
; Extension = php_curl.dll
; Extension = php_fileinfo.dll
; Extension = php_gd2.dll
; Extension = php_gettext.dll
..........
Remove the semicolon to open the corresponding extension. if you are not sure which extension should be enabled, you do not need to open the mysql extension first, you can configure it again.
After completing Step 3, the configuration on the php side is complete. remember to save it after modifying php. ini. The following describes how to configure a web server. apache is used as an example.
4. open the apache configuration file, httpd. conf, and add the following at the end of the file:
#
LoadModule php5_module "D:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php. php
# Configure the path to php. ini
PHPIniDir "D:/php"
Description of the above code:
LoadModule php5_module "D:/php/php5apache2_2.dll", load the dll file of the apache version corresponding to the php installation directory, you should check your php installation directory to see how to use the correct dll, some use php5apache2. dll.
AddHandler application/x-httpd-php. php. let apache explain the php file.
PHPIniDir "D:/php", which specifies the directory where the php. ini file is located.
Remember all backslashes When path values are added to the Apache configuration file in Windows, such as c: \ directory \ file. ext, which should be converted to a forward slash: c:/directory/file. ext. The directory must end with a slash.
5. add the system environment variables for PHP, right-click "My Computer"-"properties"-"advanced"-"environment variables ", find "PATH" in the "system variables" column and double-click it. Add at the end of the variable value
; D: \ php
To add your php installation path to the environment variable.
So far, we have completed php5.4.3 installation. If you have uninstalled the php version installed using the msi installer before installation and haven't had time to restart the computer, you should restart the computer now to complete the uninstall process, to avoid unexpected situations.
After the restart, create index. php in the web root directory and write the following code:
Phpinfo ();
?>
Start apache and access: http: // localhost. if the version is php5.4.3, the installation is successful!
The above installation process is indeed cumbersome. if you do not care about it, apache may fail to start or php may not be able to load extension libraries due to casual errors, this is one of the reasons why webmasters suggest you install php5.3 on windows.
The installation of php5.4.3 will be introduced here. I hope it will be helpful to you. if you have any questions, please follow up ~
Http://www.phptogether.com/archives/12390 1 floor pengzhaocheng16 2012-06-14 php5ts. dll
The php5ts. dll file is a php kernel dynamic link library file. without this file, the php parser cannot be used.
Therefore, when Apache loads PHP in windows, Apache not only needs to load the Apache module of PHP
LoadModule php5_module modules/php5apache2_2.dll
Specifies the type of file to be parsed using the php parser
AddType application/x-httpd-php. php
It is important to copy the php5ts. dll file to a searchable system directory, that is, windows environment variables such as c; \ windows \ system32. I put it in apache2/bin.
In addition, when PHP supports mysql, the php5ts. dll file also needs libmysql. dll support. Therefore, the libmysql. dll file must also be copied to the searchable path. I put libeay32.dll, ssleay32.dll, php_curl.dll, php5ts. dll libmysql. dll in apache2/bin, and pengzhaocheng16 2012-06-14 tomcat provides php service configuration:
Http://amixyue.blogbus.com/logs/107621313.html
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