session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)

session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/project/)

原因可能有以下几点:

注:php.ini中的open_basedir默认指向的是/tmp下,所以php.ini是否配置不重要。

1. 查看tmp文件夹权限是否够,然后赋权

chmod 777 /tmp

2. apache下配置域名的/httpd.conf和httpd-vhosts.conf配置文件中

session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)_第1张图片

你可能感兴趣的:(Apache,PHP)