任务3 PHP配置 1. PHP基础配置

查看PHP配置文件得位置

#/ucsr/local/php/bin/php -i |grep -i "loaded configuration file"

# cp /usr/local/src/php-5.6.30/php.ini-production /usr/local/php/etc/php.ini

# /usr/local/php/bin/php -i |grep -i "loaded configuration file"

# cd /usr/local/apache2.4/docs/www.111.com

# vim 123.php

<?php

phpinfo();

?>

 

vim  /usr/local/php/etc/php.ini

搜索disable_functions,编辑如下:

 

 

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,1eak,popepassthru,stream_socket_server,popen,proc_open,proc_close

disable_functions表示禁用这些函数。

定义date.timezone,减少警告

# vim /usr/local/php/etc/php.ini

找到date. timezone设置如下:

date.timezone = Asia/Shanghai

 

posted @ 2021-03-09 17:21  清空。  阅读(77)  评论(0)    收藏  举报