Jump to content
PHP論壇人

7.配置 php.ini


Recommended Posts

----------------------------
配置 php.ini
----------------------------

修改php.ini
vi /usr/local/php/etc/php.ini

 

停用危險函數

搜尋 disable_functions =

修改为

disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,pcntl_exec

 

 

 

搜尋以下這些,並修改它們的值

max_execution_time = 300

max_input_time = 180

memory_limit = 512M


顯示PHP程式錯誤,正式運作的論壇通常是 Off 關閉狀態

display_errors = Off

 


post_max_size = 100M

upload_max_filesize = 100M

max_file_uploads = 100

default_socket_timeout = 180

 

 

儲存並離開
:wq

 

重啟PHP
/etc/init.d/php-fpm restart

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...