Open_basedir and ImageGIF

I’ve seen this problem reffered to in various places on the site, but I am still not entirely clear how this works.

File write, read, and test (e.g. file_exists) are restricted to directories that match the prefix set for open_basedir. If my account name is xxxx then the open_basedir prefix is /home/xxxx/

However /home/xxxx/ is actually an alias to /home/.SOMETHING/xxxx/. This means writing a file with, for example, ImageGIF to /home/xxxx/dir/file.gif fails with an open_basedir error. On the other hand writing to /home/.SOMETHING/xxxx/dir/file.gif works okay. On the other hand the file test of file_exists(/home/xxxx/dir/file.gif) seems to work okay! What gives? Even if I do harcode the .SOMETHING in to the paths, is that guarenteed to stay the same, or will my account get moved around and have it change?

For refference I am using PHP4 in Apache mode. I tried using PHP5 in PHP-CGI mode, but I got an error message saying php5.cgi could not be found on any script. I have submitted a support mail about this, but no reply yet.

The .SOMETHING will not change so you should be ok hard-coding it. Everything other than PHP seems to work fine with the /home/xxxx/ without the .SOMETHING so it’s too bad PHP gets confused.

  • Dallas
  • DreamHost Head Honcho/Founder