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

I have following entries in the error.log

[Fri Jan 19 20:10:12 2018] [error] [client myIP] PHP Warning:
filesize() [function.filesize]: open_basedir
restriction in effect. File(/tmp/phpE4uQRA) is not within the allowed path(s):
(/var/www/) in /var/www/
extensions/quota_manager.php on line 225, referer:

[Fri Jan 19 20:10:12 2018] [error] [client myIP] PHP Warning:
move_uploaded_file() [function.move-
]: open_basedir restriction in effect. File(/tmp/phpE4uQRA)
is not within the allowed path(s): (/var/www/) in
extensions/uploader_http/uploader.php on line 97, referer:

[Fri Jan 19 20:10:12 2018] [error] [client myIP] PHP Warning: Cannot
modify header information - headers already sent by (output started at
extensions/quota_manager.php:225) in
extensions/uploader_http/uploader.php on line 120, referer:

Is it possible that you "re-program" ZPC in that way that ZPC does not ask for access outside the webroot.
Like eg. /var/www/


  • acrylian Administrator
    edited January 21

    Zenphoto does not ask for aynthing outside the webroot. Actually it only works within the webroot on the same server properly. It is techically possible to place the albums folder above the webroot to hide it but you would have to set this specifially in your config file manually.

    Those error messages seem to refer to tmp files which are actually a server internal thing that Zenphoto is not involved in. It should use what the server tells via the super global $_FILES.

    I am sure and sorry that you have this issue but I can only say I never encountered this anywhere so far and don't remember any reports in the past.

  • I found this:

    I already spoke with the hoster and he is not keen of the idea of changing the server-settings. And he is advising me, not to ask him to do so.

    Thing is, that even I have upper entries in the error.log - the pictures were successfully uploaded and things look fine - except for the error messages in the frontend and entries in the log file.
    It's just that these entries will bloat the log files.

  • acrylian Administrator

    If setting the serverpath manually via the config as suggested on that old topic does not help, you can try it yourself via htaccess for example:
    You can also try to overwrite the value in $_FILES somewhere.

    This seems a very specific, unusual error…

  • I am sorry that I've caused "some action" here with this topic.

    Our hoster did some investigating and found the source of the problem.
    It has/had nothing to do with ZPC - ZPC displayed it.
    Now he is just asking why it didn't have any effect on any other of our installations... :D

    Thanks so far.

  • acrylian Administrator

    No problem at all. Not all servers are the same or even the same configured. Glad you could solve it easily!

Sign In or Register to comment.