PHP.ini configuration file Detailed

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.