View PHP configuration file path:/usr/local/php/bin/php-i |head
There is no php.ini file you can copy in the PHP source package:
Direct the php.ini-production copy in the source bundle and rename it to the path/usr/local/php/etc/php.ini
1. Edit the PHP file:
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
---The function to disable
2. Display_errors=on ----can display errors in the browser
---error log
3.Log_errors=on -----Turn on logging error log
error_log =/usr/local/php/logs/php_errors.log----- define the path where log is located:
[Create logs directory and give permissions with 777]
4. error_reporting =e_all & ~e_notice format of the----configuration log
5. Open_basedir =/data/www:/tmp ----Restrict access to a directory, the directory where the site resides, for only one site.
Edit a virtual host file
Vim/usr/local/apache2/conf/extra/httpd-vhosts.conf
Limit multiple sites, multiple virtual hosts: Php_admin_value open_basedir "/data/www:/tmp"
PHP.ini configuration file Detailed