Sentora Support Forums

Full Version: Sentora open_basedir - how to set for specific directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

how to set for specific directory open_basedir

i get following error when running my CI project


Code:
A PHP Error was encountered Severity: Warning Message: ini_set(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/inv_opensourceworld_info:/var/sentora/temp/) Filename: drivers/Session_files_driver.php Line Number: 108 Backtrace: File: /var/sentora/hostdata/zadmin/public_html/inv_opensourceworld_info/application/controllers/Auth.php Line: 7 Function: __construct File: /var/sentora/hostdata/zadmin/public_html/inv_opensourceworld_info/index.php Line: 315 Function: require_once
Fixed the issue thanks to @Ron-e

Thread Link


http://forums.sentora.org/showthread.php...1#pid20031

Steps:

Module Admin -> Apache Config -> Select domain at "Override a Virtual Host Setting" -> unselect "OpenBase Enabled" -> save -> wait 5 min. or run daemon manually.
lol, i'm glad i could help.. Tongue
(10-26-2017, 11:31 PM)Ron-e Wrote: [ -> ]lol, i'm glad i could help.. Tongue


Hi sorry for interrupt this post, my english its not good and im new at sentora but i have the same issue when i try to use session_start

Warning: session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/adharagrill_mx:/var/sentora/temp/) in /var/sentora/hostdata/zadmin/public_html/adharagrill_mx/lang/Language.php on line 10

I saw your fix solution but you mentioned that fix could lead to an security issue so there is another way to fix?
(04-10-2019, 01:28 AM)Juan Pablo Wrote: [ -> ]Hi sorry for interrupt this post, my english its not good and im new at sentora but i have the same issue when i try to use session_start

Warning: session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/adharagrill_mx:/var/sentora/temp/) in /var/sentora/hostdata/zadmin/public_html/adharagrill_mx/lang/Language.php on line 10

I saw your fix solution but you mentioned that fix could lead to an security issue so there is another way to fix?

That is because your script is looking for /tmp while it should be pointed at /var/sentora/temp You could also try and add /tmp to the Open Base Temp Directory config in: Admin > Module Admin > Apache Config and change it to look like:

Code:
/var/sentora/temp/:/tmp/
(04-11-2019, 07:24 AM)TGates Wrote: [ -> ]That is because your script is looking for /tmp while it should be pointed at /var/sentora/temp You could also try and add /tmp to the Open Base Temp Directory config in: Admin > Module Admin > Apache Config and change it to look like:

Code:
/var/sentora/temp/:/tmp/

Sorry for the late response but i tried as you said setting this: /var/sentora/temp/:/tmp/ to Apache config and restarted the service but still got the same issue.

[Image: open_base.png]

But still got this 
[Image: issue_temp.png]
i should do the override config?
You can do the bypass to test the site and get it working, then we can sort out the folder restriction so that you can turn the blocking back on. I checked the domain and whatever scripts you are using are full of problems from the looks of it.