2

I got this error i tried to change permission for all files and folders nothing happen i tried to use dirname(FILE) but nothing happen is there anyone can help me ???

Warning: require_once(): open_basedir restriction in effect. File(/home/zadmin/public_html/XXXXXXXX/loader.php) is not within the allowed path(s): (/home/zadmin/public_html/XXXXXXXXXXXX/htdocs:/var/zpanel/temp/) in /home/zadmin/public_html/XXXXXXXXXXXXXX/htdocs/loader.php on line 10

Warning: require_once(/home/zadmin/public_html/XXXXXXXXXX/loader.php): failed to open stream: Operation not permitted in /home/zadmin/public_html/XXXXXXXXXXXXXXXXXX/htdocs/loader.php on line 10

Fatal error: require_once(): Failed opening required '/home/zadmin/public_html/XXXXXXXXXXXXXX/loader.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/zadmin/public_html/XXXXXXXXXXXXXXXXXX/htdocs/loader.php on line 10

1 Answers1

0

You can only access to files set in your open_basedir directive, which are /home/zadmin/public_html/XXXXXXXXXXXX/htdocs and /var/zpanel/temp/.

If you need to load files directly from /home/zadmin/public_html/XXXXXXXXXXXX, set your open_basedir directive accordingly or contact your hosting provider to set it for you.

Finwe
  • 6,372
  • 2
  • 29
  • 44
  • I try make something like this `php_admin_value open_basedir "/home/zadmin/public_html/XXXXXXXXXXX/htdocs:/var/zpanel/temp/"` – Mohamed Hesham Oct 09 '16 at 09:31
  • @Tetsh You have to remove `htdocs` from the path if you want it to work: `php_admin_value open_basedir "/home/zadmin/public_html/XXXXXXXXXXX/:/var/zpanel/tem‌​p/"` – Finwe Oct 09 '16 at 10:50
  • thank you it's working but i got this warning `touch(): Utime failed: Permission denied` – Mohamed Hesham Oct 09 '16 at 14:01
  • @Tetsh Those are file permission problems, different matter entirely. Make sure you have write permissions for files the touch is being called on. – Finwe Oct 09 '16 at 15:30