0

I am trying to relax php_admin_value open_basedir restriction on the server.

I am using VestaCp on Centos 64 Bit. I changed the value of php_admin_value open_basedir to none in etc/httpd/conf by writing this line

php_admin_value open_basedir none

and restrarted my server. but i still have this error in one of my domains

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

(/home/admin/web/printskool.com/public_html:/home/admin/tmp) in /home/admin/web/printskool.com/public_html/system/library/Spout/Common/Helper/FileSystemHelper.php on line 24

Community
  • 1
  • 1

2 Answers2

0

Per this forum entry you need to edit a different file

Edit /usr/local/vesta/data/templates/web/httpd/basedir.stpl and add

php_admin_value open_basedir none

to this section

<Directory %sdocroot%>

Note that this will disable it for ALL SITES and could be a security risk

Machavity
  • 30,841
  • 27
  • 92
  • 100
  • Its just a temporary need and the variable is set to this value in file -php_admin_value open_basedir %docroot%:%home%/%user%/tmp. can i restore this value later without any consequences? – saketh velugoti Mar 11 '17 at 18:29
  • You should be able to. If it's like other CPs, It will overwrite any configurations manually made and you should be able to trigger that reset directly. – Machavity Mar 11 '17 at 18:33
  • I set it to none and restarted the server, sadly still facing the same issue. – saketh velugoti Mar 11 '17 at 18:37
0

After trying everything here is how I solved it.

http://arstech.net/fix-error-realpath-open_basedir-restriction-effect/ with reference to this thread.

I don't know how but it worked after nearly 3 hours of searching through the web.