php.ini配置文件

  php的配置文件路径:[root@www ~]# ls /usr/local/php/etc/php.ini

如果不知道她的路径:[root@www ~]# /usr/local/php/bin/php -i |head(最后一行就是)

一.  php配置 
1. 配置disable_function(要禁用的一些函数,高风险函数)
disable_functions = eval,assert,popen,passthru,escapeshellarg,escapeshellcmd,passthru,exec,system,chroot,scandir,chgrp,chown,escapeshellcmd,escapeshellarg,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

2. 配置error_log
display_error=off
log_errors=on
error_log=/usr/local/php/logs/php_errors.log(如果ls /usr/local/php/logs/没有这个目录,那么mkdir /usr/local/php/logs/, chmod 777 /usr/local/php/logs/)
error_reporting = E_ALL | E_NOTICE
   
错误级别参考  http://www.aminglinux.com/bbs/thread-6973-1-1.html

3. 配置open_basedir
php.ini: open_basedir = /data/www:/tmp
httpd.conf: php_admin_value open_basedir  "/data/www/:/tmp/"

4. 安装php的扩展模块(memcache)
http://www.aminglinux.com/bbs/thread-45-1-1.html




你可能感兴趣的:(local,System,配置文件)