[SOLVED] How to solve the problem of open_basedir in a customized environment?
Posted: Sun Aug 08, 2021 4:50 am
My boss gave up cPanel's hosting service due to special factors, So we rented a VPS hosting in Japan:

But I encountered a problem like this:
What I can reveal is that we have multiple domain folders under: /www/wwwroot/
Like this:
/www/wwwroot/D Web page root directory of the website
/www/wwwroot/B Web page root directory of the website
/www/wwwroot/C Web page root directory of the website
I found this teaching, What should I do to limit this "tmp" directory to "/www/wwwroot/tmp/"?
https://mediatemple.net/community/produ ... en_basedir
How do I modify my php.ini file?
open_basedir = "/path/to/first/folder:/path/to/second/folder" to "/www/wwwroot/tmp/"
Can anyone tell me?
Thank you!

But I encountered a problem like this:
Code: Select all
Warning: session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/wwwroot/: /tmp/) in /www/wwwroot/user/public_html/system/library/session.php on line 32
Warning: session_start(): Failed to initialize storage module: files (path: ) in /www/wwwroot/user/public_html/system/library/session.php on line 32
Warning: SessionHandler::create_sid(): Session is not active in /www/wwwroot/user/public_html/system/library/session/native.php on line 5
Like this:
/www/wwwroot/D Web page root directory of the website
/www/wwwroot/B Web page root directory of the website
/www/wwwroot/C Web page root directory of the website
I found this teaching, What should I do to limit this "tmp" directory to "/www/wwwroot/tmp/"?
https://mediatemple.net/community/produ ... en_basedir
How do I modify my php.ini file?
open_basedir = "/path/to/first/folder:/path/to/second/folder" to "/www/wwwroot/tmp/"
Can anyone tell me?
Thank you!