Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error uploading files
#1
Hello,

I need some help again, if possible.
I can not upload files. I get the following errors when I try:

[Thu Dec 31 10:46:54 2009] [error] [client xx.xx.xxx.x] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/example.com/httpdocs:/tmp) in /var/www/vhosts/example.com/httpdocs/dms/inc/inc.FileUtils.php on line 60

[Thu Dec 31 10:46:54 2009] [error] [client xx.xx.xxx.x] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: SAFE MODE Restriction in effect. The script whose uid is 10078 is not allowed to access /var owned by uid 0 in /var/www/vhosts/example.com/httpdocs/dms/inc/inc.FileUtils.php on line 61

I hope someone can help me.

Thanks in advance.

Best regards,
Reply
#2
Hi JPA

is LetoDMS hosted locally? or on a shared hosting account ?

when i look at this error msg :

[Thu Dec 31 10:46:54 2009] [error] [client xx.xx.xxx.x] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/example.com/httpdocs:/tmp) in /var/www/vhosts/digital5.eu/httpdocs/dms/inc/inc.FileUtils.php on line 60

i see your issue is path do this , go in /var/www/vhosts/example.com/httpdocs see if you can find it there if you cant find it there

you gotta find the right path for LetoDMS that is installed

[Thu Dec 31 10:46:54 2009] [error] [client xx.xx.xxx.x] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: SAFE MODE Restriction in effect. The script whose uid is 10078 is not allowed to access /var owned by uid 0 in /var/www/vhosts/example.com/httpdocs/dms/inc/inc.FileUtils.php on line 61

for this issue what version of php have you installed?

thanks

LetoDMS Group
Reply
#3
Hi,

We are using a shared hosting account.
I have solved the first problem as follows:
You were right, the path I was using for the uploaded files was worg. I was using the same one than the roodir (which was working when locally hosted) but I just needed the path from the URL.

Regarding the second problem, which is still there, the PHP Version we are using is 5.2.9.

Thanks a lot!
Reply
#4
Same problem here with Plesk hosting.
I edited conf/httpd.include to add the upload dir in this way:

Code:
<IfModule mod_php5.c>
   php_admin_flag engine on
   php_admin_flag safe_mode off
   php_admin_value open_basedir "/var/www/vhosts/MYDOMAIN/httpdocs:/tmp:/var/www/vhosts/MYDOMAIN/httpdocs/mydms/content"
</IfModule>

But errors remain:

Code:
[Thu Jan 21 09:38:18 2010] [error] [client 87.219.213.168] PHP Warning:  mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/MYDOMAIN/httpdocs:/tmp:/var/www/vhosts/MYDOMAIN/httpdocs/mydms/content) in /var/www/vhosts/MYDOMAIN/httpdocs/mydms/inc/inc.FileUtils.php on line 61, referer: http://MYDOMAIN/mydms/out/out.AddDocument.php?folderid=3

Any idea?

Seems like referenced dir ( File(/var) ) is causing trouble, but no such dir is needed for anything related in inc.Settings.php, is it?
Reply
#5
make sure this is correct :

// Where the uploaded files are stored (best to choose a directory that
// is not accessible through your web-server)
var $_contentDir = "e:/web/mydms/content/";

that would be in setting.php

and make sure you permission that folder

Thanks

LetoDMS
Reply
#6
I have chosen a directory inside the httpdocs, but with denied access from .htaccess. I still have the problem with uploading files with this error:

Code:
[Mon Jan 25 11:33:35 2010] [error] [client MYIP] PHP Warning:  is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/MYDOMAIN/httpdocs:/var/www/vhosts/MYDOMAIN/httpdocs/mydms/content:/tmp) in /var/www/vhosts/MYDOMAIN/httpdocs/mydms/inc/inc.FileUtils.php on line 60, referer: http://MYDOMAIN/mydms/out/out.AddDocument.php?folderid=3
[Mon Jan 25 11:33:35 2010] [error] [client MYIP] PHP Warning:  mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/MYDOMAIN/httpdocs:/var/www/vhosts/MYDOMAIN/httpdocs/mydms/content:/tmp) in /var/www/vhosts/MYDOMAIN/httpdocs/mydms/inc/inc.FileUtils.php on line 61, referer: http://MYDOMAIN/mydms/out/out.AddDocument.php?folderid=3

What is the problem with /var ? Why does it try to work with that dir instead of the full path?

I have tried several $_contentDir combinations as jpa suggested by PM, with absolute and relative paths, but it should be like
var $_contentDir = "/var/www/vhosts/MYDOMAIN/httpdocs/mydms/content/";

I have configured open_basedir to allow access to that dir, and it has full writting access (777)...

PHP version is PHP 5.2.6 over CentOS 5 in a Plesk 9.2 shared hosting.

Any idea?
Reply
#7
if this is shared hosting account please contact your hosting provider to find out what is your correct path for LetoDMS

Thanks

LetoDMS.
Reply
#8
The path is right. I'm the admin for that server.

(01-26-2010, 04:54 AM)administrator Wrote: if this is shared hosting account please contact your hosting provider to find out what is your correct path for LetoDMS

Thanks

LetoDMS.
Reply
#9
[Mon Jan 25 11:33:35 2010] [error] [client MYIP] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/MYDOMAIN/httpdocs:/var/www/vhosts/MYDOMAIN/httpdocs/mydms/content:/tmp) in /var/www/vhosts/MYDOMAIN/httpdocs/mydms/inc/inc.FileUtils.php on line 60, referer: http://MYDOMAIN/mydms/out/out.AddDocumen...folderid=3

Oh i know how to resolve this issue

/MYDOMAIN/httpdocs/mydms/content/ use that.

and you would need to permission the content folder.

that should resolve the issue

let us know.

Thanks

LetoDMS.
Reply
#10
That solved the previous error, but now I have
Code:
[Wed Jan 27 13:10:25 2010] [error] [client MYIP] PHP Warning:  mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in /var/www/vhosts/MYDOMAIN/httpdocs/mydms/inc/inc.FileUtils.php on line 61, referer: http://MYDOMAIN/mydms/out/out.AddDocument.php?folderid=3
PHP Safe mode is off.
content dir permissions are set to 777...

Thanks for your help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)