日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php5.4环境升级,CentOS环境中编译升级PHP至5.4版本记录

發布時間:2024/7/23 php 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php5.4环境升级,CentOS环境中编译升级PHP至5.4版本记录 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

先備份

mv?/data/server/php?/data/server/php.5.2

mv?/etc/init.d/php-fpm?/etc/init.d/php-fpm.5.2

編譯源碼

首先先執行./buildconf ?--force,為了防止出現 cp:cannot stat ‘sapi/cli/php.1‘: No such file or directory

./buildconf?--force

./configure?--prefix=/data/server/php?--with-config-file-path=/data/server/php/etc?--with-mysql=/data/server/mysql?--with-mysqli=/data/server/mysql/bin/mysql_config?--with-gd?--with-iconv??--with-zlib??--enable-xml??--enable-bcmath?--enable-shmop?--enable-sysvsem?--enable-inline-optimization?--with-curlwrappers?--enable-mbregex??--enable-fpm?--enable-mbstring?--enable-ftp?--enable-gd-native-ttf?--with-openssl?--enable-pcntl?--enable-sockets?--with-xmlrpc?--enable-zip?--enable-soap?--without-pear?--with-gettext?--enable-session?--with-mcrypt?--with-curl

make

make?install

如果安裝出現錯誤

make: *** [sapi/cli/php] Error 1

解決方法:

make?ZEND_EXTRA_LIBS=‘-liconv‘

ln?-s?/usr/local/lib/libiconv.so.2?/usr/lib64/

配置文件

cp??php.ini-production???/data/server/php/etc/php.ini

rm?-rf?/etc/php.ini

ln?-s?/data/server/php/etc/php.ini??/etc/php.ini

cp??/data/server/php/etc/php-fpm.conf.default???/data/server/php/etc/php-fpm.conf

vi ?/data/server/php/etc/php-fpm.conf

user?=?www

group?=?www

pid?=?run/php-fpm.pid

listen?=?/tmp/php-cgi.sock

listen.owner?=?www

listen.group?=?www

設置 php-fpm開機啟動

cp?sapi/fpm/init.d.php-fpm???/etc/rc.d/init.d/php-fpm

chmod?+x?/etc/rc.d/init.d/php-fpm

chkconfig?php-fpm?on

vi /etc/php.ini

找到:;date.timezone =

修改為:date.timezone = PRC ? #設置時區

找到:expose_php = On

修改為:expose_php = OFF ?#禁止顯示php版本的信息

找到:short_open_tag = Off

修改為:short_open_tag = ON ?#支持php短標簽

找到:disable_functions =

修改為:

disable_functions?=?passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshell,cmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd,?posix_getegid,posix_geteuid,posix_getgid,?posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,?posix_getppid,posix_getpwnam,posix_getpwuid,?posix_getrlimit,?posix_getsid,posix_getuid,posix_isatty,?posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,?posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname

配置完成后重啟PHP-FPM服務即可!

原文:http://my.oschina.net/u/783086/blog/526112

總結

以上是生活随笔為你收集整理的php5.4环境升级,CentOS环境中编译升级PHP至5.4版本记录的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。