Post by HAO » 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:
Image

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
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!

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by HAO » Sun Aug 08, 2021 9:33 am

Okay, I found a way to write it.

Code: Select all

[HOST=demo.xxx.tw]
open_basedir=/www/wwwroot/:/tmp/
[PATH=/www/wwwroot/xxx.tw]
open_basedir=/www/wwwroot/: /tmp/
This can also solve my problem.

At this stage, I can accept it.

Thanks for your reply.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm
Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 82 guests