我从php 5.2.17升级到php 5.3.6注意,php5.3.6使用apc,请不要勾选Suhosin

centso 5.6 32位用下面的代码:

   

--prefix=/usr/local/lsws/lsphp5 --enable-memory-limit --with-pdo-mysql=mysqlnd --with-mysql --with-mysqli=mysqlnd --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv --with-litespeed --enable-inline-optimization --with-curl --with-curlwrappers --with-mcrypt --with-mhash --with-mime-magic --with-openssl --with-freetype-dir=/usr/lib --with-jpeg-dir=/usr/lib --enable-bcmath

centso5.6 64位用下面的代码

   

--prefix=/usr/local/lsws/lsphp5 --enable-memory-limit --with-pdo-mysql=mysqlnd --with-mysql --with-mysqli=mysqlnd --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv --with-litespeed --enable-inline-optimization --with-curl --with-curlwrappers --with-mcrypt --with-mhash --with-mime-magic --with-openssl --with-freetype-dir=/usr/lib64 --with-jpeg-dir=/usr/lib64 --enable-bcmath --with-libdir=lib64

升级完毕后运行探针,出现下面的情况

   

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 142

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/DEFAULT/html/phpinfo.php:142) in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 178

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 142

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/DEFAULT/html/phpinfo.php:142) in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 178

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 142

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/DEFAULT/html/phpinfo.php:142) in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 178

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/DEFAULT/html/phpinfo.php:142) in /usr/local/lsws/DEFAULT/html/phpinfo.php on line 934

需要设置个时区,编辑/usr/local/lsws/lsphp5/lib/php.ini

添加:date.timezone = Asia/Shanghai

下面是我的样本:

   

date.timezone = Asia/Shanghai
[APC]
extension_dir = /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20090626/
extension=apc.so
apc.shm_size = 32M

编辑完 service lsws restart

再次刷新页面应该是没上面的提示了,如果还有请留言吧!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。