本文目錄一覽:
- 1、怎樣升級Wampsever中PHP版本
- 2、如何升級伺服器系統環境為php5.4,並安裝zend loader
- 3、編譯php5.4的時候出現錯誤—-configure: error: in `/usr/local/src/php540/php-5.4.0′:
怎樣升級Wampsever中PHP版本
1.下載php版本壓縮包,解壓php版本壓縮包
2.停掉wamp服務
3.替換wamp\php下的php文件,從已存在的php版本文件中(如php5.3.0, 複製以下文件: – php.ini、phpForApache.ini和wampserver.conf到php5.4.40文件夾.
打開php5.4.40文件夾的以下文件: – php.ini和phpForApache.ini並且搜索5.3.0然後替換為php5.4.40。
4.替換wamp\Apache2\bin目錄下的php5nsapi.dll 和 php5ts.dll(對應當前php版本的)
修改\Wamp\bin\apache\Apache2.2.11\conf\httpd.conf中的LoadModule
php5_module 「D:/Wamp/bin/php/php5.3.10/php5apache2_2.dll」為LoadModule
php5_module 「D:/Wamp/bin/php/php5.4.40/php5apache2_2.dll」
5.重啟wamp服務,phpinfo()測試
關於這個問題,差不多就是這個樣子的了,你如果不明白,可以自己去後盾瞅瞅,我這些都是在後盾上學的,有空可以去看一下,就算不喜歡也沒關係啊,何樂而不為呢?
如何升級伺服器系統環境為php5.4,並安裝zend loader
最近zend發布了支持php5.4的ZendGuardLoader,以前一直只支持5.3,因為一個vps的環境是php5.4,毫不猶豫的我想應該進行安裝ZendGuardLoader,首先下載ZendGuardLoader,官方要進行註冊才能下載,所以請下載我這裡現成的for32位!
ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz
解壓後將 ZendGuardLoader.so 上傳到伺服器 /usr/zend/ 目錄
找到你所在環境中的php.ini位置,然後編譯php.ini,在合適的位置加入
[Zend Guard]
zend_extension=/usr/zend/ZendGuardLoader.so
; Enables loading encoded scripts. The default value is On
zend_loader.enable=1
; Optional: following lines can be added your php.ini file for ZendGuardLoader configuration
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
重啟環境,比如/etc/init.d/httpd restart,至此ZendGuardLoader搞定.
編譯php5.4的時候出現錯誤—-configure: error: in `/usr/local/src/php540/php-5.4.0′:
錯誤如下:
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for a sed that does not truncate output… /bin/sed
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for cc… cc
checking whether the C compiler works… no
configure: error: in /usr/local/src/php540/php-5.4.0′: configure: error: C compiler cannot create executables See config.log’ for more details.
分析,百度了很長時間終於發現,原來是缺少gcc
所以:
yum install -y gcc就可以了
原創文章,作者:YNAM,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/141244.html