open_basedir restriction in helper.php

Ask all your questions regarding OC 4.x and older. Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read How To Solve Problems By Yourself

open_basedir restriction in helper.php

Postby ovidiu » Sun Jun 24, 2012 9:27 pm

Please don't discard this without reading, I am sure there is some mistake here.
Pay attention to this part of the error: File(/srv/www/cloud.premaman.co.za/web/file) is not within the allowed path(s). That is the wrong path. The right path should be: /var/www/cloud.premaman.co.za/web/file - I have no idea where the srv part comes from :-(

I foudn this error in my error logs:

Code: Select all
[Sun Jun 24 21:53:41 2012] [warn] [client 196.210.184.238] mod_fcgid: stderr: PHP Warning:  is_executable(): open_basedir restriction in effect. File(/srv/www/cloud.premaman.co.za/web/file) is not within the allowed path(s): (/var/www/clients/client20/web47/web:/var/www/clients/client20/web47/tmp:/var/www/cloud.premaman.co.za/web:/srv/www/cloud.premaman.co.za/web:/usr/share/php5:/usr/share/php/PEAR:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php:/usr/share/squirrelmail) in /var/www/clients/client20/web47/web/lib/helper.php on line 485
Environment: Debian 6.0.5
Server: own root server
Database: MySQL 5.1.63
Client: MAC Lion
OC-Version: 4.0.4
PHP-Version: 5.3.3-7+squeeze13
ovidiu
Beginner
 
Posts: 40
Joined: Sun Jun 24, 2012 9:16 pm

Re: open_basedir restriction in helper.php

Postby sjau » Mon Jun 25, 2012 12:19 pm

are the /var/www and /srv paths somehow symlihnked? Best to create a phpinfo.php file with this content:

Code: Select all
<?php phpinfo(); ?>


and call it in the browser. It should tell you the local paths and basedirs etc.
sjau
Starter
 
Posts: 79
Joined: Sun May 20, 2012 9:34 pm

Re: open_basedir restriction in helper.php

Postby Otzelott » Mon Jun 25, 2012 2:30 pm

Hello,

i've had a similar error, when i connect by webdav.
I'm running Owncloud on Ubuntu 10.04 LTS.
The Problem was, that the Pear folder wasn't correct.
Here are the Lines in the php.ini that i've edited:
Code: Select all
open_basedir = "/var/www/virtual/mydomain:/usr/share/php:/usr/share/php/PEAR"
include_path = ".:/usr/share/php:/usr/share/php/PEAR"
Otzelott
Beginner
 
Posts: 17
Joined: Mon Jun 25, 2012 1:20 pm

Re: open_basedir restriction in helper.php

Postby ovidiu » Mon Jun 25, 2012 11:01 pm

I do apologize. the /srv part is supposed to be there. seems to have appeared with the latest version of my control panel (at least I haven't noticed it yet).

As to the PEAR paths, it looks like I've got the properly added already to the open_basedir but I was indeed missing them from the include_path directive.

Have added them now. Everything is fine now, thanks again guys!
Environment: Debian 6.0.5
Server: own root server
Database: MySQL 5.1.63
Client: MAC Lion
OC-Version: 4.0.4
PHP-Version: 5.3.3-7+squeeze13
ovidiu
Beginner
 
Posts: 40
Joined: Sun Jun 24, 2012 9:16 pm

Re: open_basedir restriction in helper.php

Postby ovidiu » Tue Jun 26, 2012 1:23 pm

hm, I might have spoken too soon, today another one popped up:

Code: Select all
[Tue Jun 26 13:55:53 2012] [warn] [client 198.54.202.254] mod_fcgid: stderr: PHP Warning:  is_executable(): open_basedir restriction in effect. File(/srv/www/cloud.premaman.co.za/web/file) is not within the allowed path(s): (/var/www/clients/client20/web47/web:/var/www/clients/client20/web47/tmp:/var/www/cloud.premaman.co.za/web:/usr/share/php5:/usr/share/php/PEAR:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php:/usr/share/squirrelmail:/srv/www/cloud.premaman.co.za/web:) in /var/www/clients/client20/web47/web/lib/helper.php on line 485


not sure why /srv/www/cloud.premaman.co.za/web/file is not within /srv/www/cloud.premaman.co.za/web ?
Environment: Debian 6.0.5
Server: own root server
Database: MySQL 5.1.63
Client: MAC Lion
OC-Version: 4.0.4
PHP-Version: 5.3.3-7+squeeze13
ovidiu
Beginner
 
Posts: 40
Joined: Sun Jun 24, 2012 9:16 pm


Return to OwnCloud Community Edition 4.x and older

Who is online

Users browsing this forum: Bing [Bot] and 3 guests