APMServ5.2.6 Upgrading PHP

Source: Internet
Author: User
Tags php website

The two days of idle nothing, just want to learn thinkphp. Learn thinkphp to install the Apache, MySQL, PHP and other operating environment first.

For convenience, you intend to use an integrated environment. Thinkphp Official website recommended is "WAMP", it is really convenient to use, but when modifying the Apache configuration file http.conf, always with "notepad" open, change it very inconvenient. So I would like to change the other integration environment, tried "XAMPP" after seeing "Apmserv". Because "XAMPP" is in English, so resolutely chose "apmserv".

After installing the Apmserv, it is quite cool to use it, so it is convenient to modify the configuration. Is the integration of things a bit more, but not to enable it will not affect what, the overall is more satisfactory.

However, when running thinkphp, there is a new problem: PHP requires a minimum version of 5.3. Currently Apmserv PHP version is only 5.2.6, can not meet the demand, how to do? Can you only use "WAMP" or "XAMPP"? How to make thinkphp in apmserver environment normal operation? Upgrade PHP version? Yes, upgrade version, since the official did not upgrade, then upgrade themselves.

Baidu "APMServ5.2.6 PHP Upgrade", a lot of articles are stereotyped, said is not enough detailed. Google recently also can not use, only "dead Horse when live horse medicine", chose one of them to try to upgrade. It took a while to finally succeed. Here's a summary of this upgrade:

First step: Download the new version of PHP

The first thing to be clear: what version of PHP is selected?
If you are using apache+php under Windows, please select the VC6 version;
If you are using iis+php under Windows, select the VC9 or VC11 version.

Because Apmserv is using apache+php, you can only download the VC6 version of PHP.
Check out the PHP website to download the latest version of VC6:php-5.3.0-win32-vc6-x86.zip

Step two: Update the PHP file

Unzip the downloaded PHP file, unzip the folder "php-5.3.0-win32-vc6-x86" to the root of the APMServ5.2.6, and I'll place it in "D:\APMServ5.2.6".

Then copy the original "PHP" directory "ext " and "Extras" folder into the "php-5.3.0-win32-vc6-x86" directory, encountered duplicate files, do not overwrite.

And the original "PHP" Directory of "Libmcrypt.dll", "libmhash.dll" and "libmysql.dll" three files copied to the "php-5.3.0 -win32-vc6-x86"directory, encountered duplicate files, overwrite.

Finally, back up the original PHP file, I'm renaming it "Php_backup", and rename "php-5.3.0-win32-vc6-x86" to: "PHP".

Step Three: Modify the configuration file

Rename the "php.ini-production" file in the "PHP" directoryto: "PHP.ini".

Open the file and find:

?
1 short_open_tag = Off

Modified to:

?
1 short_open_tag = On

Found it:

?
123 ; extension_dir = "./"; On windows:; extension_dir = "ext"

Modified to:

?
1 extension_dir = "D:/APMServ5.2.6/PHP/ext"

Note: The path here is filled out according to the actual situation.

Found it:

?
1234567891011121314151617181920212223242526272829303132333435363738 ;extension=php_bz2.dll;extension=php_curl.dll;extension=php_fileinfo.dll;extension=php_gd2.dll;extension=php_gettext.dll;extension=php_gmp.dll;extension=php_intl.dll;extension=php_imap.dll;extension=php_interbase.dll;extension=php_ldap.dll;extension=php_mbstring.dll;extension=php_exif.dll      ; Must be after mbstring as it depends on it;extension=php_mysql.dll;extension=php_mysqli.dll;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client;extension=php_oci8_11g.dll  ; Use with Oracle 11g Instant Client;extension=php_openssl.dll;extension=php_pdo_firebird.dll;extension=php_pdo_mssql.dll;extension=php_pdo_mysql.dll;extension=php_pdo_oci.dll;extension=php_pdo_odbc.dll;extension=php_pdo_pgsql.dll;extension=php_pdo_sqlite.dll;extension=php_pgsql.dll;extension=php_phar.dll;extension=php_pspell.dll;extension=php_shmop.dll;extension=php_snmp.dll;extension=php_soap.dll;extension=php_sockets.dll;extension=php_sqlite.dll;extension=php_sqlite3.dll;extension=php_sybase_ct.dll;extension=php_tidy.dll;extension=php_xmlrpc.dll;extension=php_xsl.dll;extension=php_zip.dll

Put the preceding ";" As needed, I removed all the ";", which means to open all the extensions. If you are unfamiliar with PHP, it is recommended to remove all ";".

?
12345678910111213141516171819202122232425262728293031323334353637 extension=php_bz2.dllextension=php_curl.dllextension=php_fileinfo.dllextension=php_gd2.dllextension=php_gettext.dllextension=php_gmp.dllextension=php_intl.dllextension=php_imap.dllextension=php_interbase.dllextension=php_ldap.dllextension=php_mbstring.dllextension=php_exif.dllextension=php_mysql.dllextension=php_mysqli.dllextension=php_oci8.dllextension=php_oci8_11g.dllextension=php_openssl.dllextension=php_pdo_firebird.dllextension=php_pdo_mssql.dllextension=php_pdo_mysql.dllextension=php_pdo_oci.dllextension=php_pdo_odbc.dllextension=php_pdo_pgsql.dllextension=php_pdo_sqlite.dllextension=php_pgsql.dllextension=php_pspell.dllextension=php_shmop.dllextension=php_snmp.dllextension=php_soap.dllextension=php_sockets.dllextension=php_sqlite.dllextension=php_sqlite3.dllextension=php_sybase_ct.dllextension=php_tidy.dllextension=php_xmlrpc.dllextension=php_xsl.dllextension=php_zip.dll

Finally, add the following code at the end of the document:

?
12345678910111213141516171819202122 [eaccelerator]zend_extension_ts="D:/APMServ5.2.6/zend/eAccelerator/eaccelerator.dll"eaccelerator.shm_size="32"eaccelerator.cache_dir="D:/APMServ5.2.6/tmp/eaccelerator/"eaccelerator.enable="1"eaccelerator.optimizer="1"eaccelerator.check_mtime="1"eaccelerator.debug="0"eaccelerator.filter=""eaccelerator.shm_max="0"eaccelerator.shm_ttl="0"eaccelerator.shm_prune_period="0"eaccelerator.shm_only="0"eaccelerator.compress="1"eaccelerator.compress_level="9"eaccelerator.keys = "shm"eaccelerator.sessions = "shm"[Zend]zend_optimizer.optimization_level=1023zend_optimizer.encoder_loader=1zend_extension_ts="D:/APMServ5.2.6/zend/ZendOptimizer-3.3.3/php-5.2.x/ZendOptimizer.dll"

Here, APMServ5.2.6 has been upgraded to PHP successfully.

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.