ZenPhoto trying to access /var/www instead of current directory

Hey guys. I created the following ZenPhoto album:
http://adamspice.com/zp/

However, as you can see, it's returning several errors regarding open_basedir. I spent a while trying to correct this using pages like
http://inebriatedrabbit.com/index.php/Correct_the_Error_"open_basedir_restriction_in_effect"
and
http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/Q_22445164.html

Originally the Experts Exchange page loaded, now it wants me to pay, but the instructions it gave were essentially the same as on InebriatedRabbit but with an extra step to get Plesk to accept the new settings. However, after all of these efforts, I realized something; the application was trying to access /var/www/(folder) rather than /var/www/adamspice.com/httpdocs/zp/(folder) as it was supposed to. I corrected this in the first instance on line 20 of rating.php by just adding the absolute path to the file it wanted and that was enough to at least get the page to load, but I really would like to avoid going through each file and inserting absolute paths in every instance. Am I doing something wrong here?

Comments

  • Well .... nevermind. Now it seems to be working and I have no idea why. Thank you for looking!
  • All right, I added another album, "unsorted." It's still returning the error:

    http://adamspice.com/zp/

    This time, I've left it be for several hours (4 or more) and it's still not going away. Any suggestions would be appreciated. Thank you in advance.
  • Ok, something is going wrong with relative paths on your server. The exif.php script is trying to load another script--`...makers/cannon.php`. However, instead of looking for it in the `zp/zp-core/exif/makers` your server is looking in `var/www/makers/canon.php`.

    You may have to force the definition of the server path in your zp-config.php file circa line 70. (You may also find you have problems with the WEBPATH and have to force its definition as well.)
  • Thank you for your suggestion, sbillard. I have uncommented and edited the lines you mentioned:

    define('WEBPATH', '/zp');
    define('SERVERPATH', '/var/www/vhosts/adamspice.com/httpdocs/zp');

    However, the open_basedir and 'cannot open stream' errors are still being returned. Additionally, there is a warning about the constant SERVERPATH already being defined (I realize this is a warning and, as such, can be ignored, but I'd prefer not to have to turn off display_errors if possible). Did I define these values incorrectly or is there something else amiss?
  • Those defines look correct. Thanks for the notice of the error. We will correct that, should not be happening, but as you surmise, it is just a warning, so not effecting the problem you are having.

    I do not know what is causing the open_basedir problem, but maybe you can avoide the problem by changing the statement in exif.php which is getting the error. Change it to `require_once(dirname(__FILE__).'/makers/canon.php');`
Sign In or Register to comment.