码迷,mamicode.com
首页 > Web开发 > 详细

Centos php项目发布问题

时间:2015-08-06 10:38:56      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

LAMP环境,项目运行错误日志路径:/var/log/httpd

错误日志例如:

[Sat Jul 11 16:51:24 2015] [error] [client 192.168.17.3] PHP Warning:  include_once(): open_basedir restriction in effect. File(/var/www/website/config/config.php) is not within the allowed path(s): (.:/tmp/) in /var/www/website/mode/upload/uploadajax.php on line 3, referer: http://192.168.100.145/?m=index
[Sat Jul 11 16:51:24 2015] [error] [client 192.168.17.3] PHP Warning:  include_once(/var/www/website/config/config.php): failed to open stream: Operation not permitted in /var/www/website/mode/upload/uploadajax.php on line 3, referer: http://192.168.100.145/?m=index
[Sat Jul 11 16:51:24 2015] [error] [client 192.168.17.3] PHP Warning:  include_once(): Failed opening ../../config/config.php for inclusion (include_path=.:/usr/share/pear:/usr/share/php) in /var/www/website/mode/upload/uploadajax.php on line 3, referer: http://192.168.100.145/?m=index
[Sat Jul 11 16:51:24 2015] [error] [client 192.168.17.3] PHP Notice:  Undefined variable: rock in /var/www/website/mode/upload/uploadajax.php on line 4, referer: http://192.168.100.145/?m=index
[Sat Jul 11 16:51:24 2015] [error] [client 192.168.17.3] PHP Fatal error:  Call to a member function now() on a non-object in /var/www/website/mode/upload/uploadajax.php on line 4, referer: http://192.168.100.145/?m=index

出现该错误,需要修改php.ini

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir
open_basedir = .:/

参考:php错误提示 open_basedir restriction in effect 解决

 

Centos php项目发布问题

标签:

原文地址:http://www.cnblogs.com/bmbh/p/4639068.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!