tp 才引入入口文件require报错:
Warning: require(): open_basedir restriction in effect.
File(/home/wwwroot/default/txsq/tortoise/ThinkPHP/Library/Vendor/Qiniu/autoload.php) is not within the allowed path(s)
: (/home/wwwroot/default/txsq/tortoise/Public/:/tmp/:/proc/) in /home/wwwroot/default/txsq/tortoise/Public/admin.php on line 29 Warning: require(/home/wwwroot/default/txsq/tortoise/ThinkPHP/Library/Vendor/Qiniu/autoload.php)
: failed to open stream: Operation not permitted in /home/wwwroot/default/txsq/tortoise/Public/admin.php on line 29 Fatal error: require(): Failed opening required '../ThinkPHP/Library/Vendor/Qiniu/autoload.php'
(include_path='.:/usr/local/php/lib/php') in /home/wwwroot/default/txsq/tortoise/Public/admin.php on line 29 lnmp环境配置: 3处改动地方---->排查过程: 从phpinfo.php中查找php.ini-----所在位置
/usr/local/php/etc/php.ini .display_errors = On; //由off改为on
.session.save_path = "/tmp" //开启 sesssion tmp~~~~ vim enable-php-pathinfo.conf -----find---->fastcgi.conf
vim fastcgi.conf ----> .#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; //前面加个#,注释掉;~~~~~~最核心一步;~~~~可以看nginx 日志文件来排查 // 有时候多php版本环境,不可注释,可以用下面的方法
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/home/wwwroot/default/:/tmp/:/proc/";
tibaobao.conf pathinfo ----> sudo lnmp reload //重新启动lnmp
zb@zb-computer:/home/wwwroot/default/corps$ sudo lnmp status ----lnmp状态查看~~~
[sudo] password for zb:
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| http://lnmp.org |
+-------------------------------------------+
nginx (pid ) is running...
php-fpm is runing!
* MySQL running () sudo lnmp reload ---- 重启; 不是require不支持,是pathinfo 域名访问链接什么的。。。