# vim /data/wwwroot/php/index.php
在浏览器中访问
# cd /usr/local/src/php-5.6.30/ # cp php.ini-development /usr/local/php/etc/php.ini # /usr/local/apache2.4/bin/apachectl -t # /usr/local/apache2.4/bin/apachectl graceful
# /usr/local/php/bin/php -i|grep -i "loaded configuration file"
# vim /usr/local/php/etc/php.ini disable_functions = eval,assert,popen,passthru,escapeshellarg,escapeshellcmd,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_get_status,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,leak,popepassthru,stream_socket_server,popen,proc_open,proc_close,phpinfo
# /usr/local/apache2.4/bin/apachectl graceful
# vim /usr/local/php/etc/php.ini date.timezone = Asia/Shanghai 或 Asia/Chongqing
不需要把错误信息显示到浏览器里
display_errors = Off
以上这个命令会显示空白页
log_errors = On //开启错误日志 error_log = /tmp/php_errors.log //定义错误日志的路径 error_reporting = E_ALL //错误报告级别(最不严谨的)
原文地址:http://blog.51cto.com/13480443/2073649