My Photo Album was hosted on a PC in our Intranet. The same PC was also reachable from the internet through our firewall (port forwarding).
So local users could reach the album with
http://foo.bar.local/PhotoAlbumusers from the internet had to use
http://foo.dyndns.org:8080/PhotoAlbumThus it was impossible to set album_web and cgi_web for both. :'(
Luckily the Apache Web-Server provides some environment variables.

To use this patch, you have to edit your album.cfg:
- add GetPathsFromEnv=1
- adjust album_web (it should be relative to your server root e.g. /PhotoAlbum )
(Just for your information: cgi_web is totally ignored, deal with it as you please)
Of course you have to edit your album.pl too:
replace # Full (local) path to album.pl - don't change this
$::albumprog=$0;
debug("\$0: $0",2,__LINE__);
# Change all \'s to /'s
$::albumprog=~s/\\/\//g;
# Drop the preceeding path
$::albumprog=~s/.*\/(.*)/$1/;
$::albumprog=$::cgi_web."/".$::albumprog;
with if (!$::GetPathsFromEnv || $::GetPathsFromEnv=='0') {
# Full (local) path to album.pl - don't change this
$::albumprog=$0;
debug("\$0: $0",2,__LINE__);
# Change all \'s to /'s
$::albumprog=~s/\\/\//g;
# Drop the preceeding path
$::albumprog=~s/.*\/(.*)/$1/;
$::albumprog=$::cgi_web."/".$::albumprog;
}
else {
debug("Try to get Paths from Environment",2,__LINE__);
# Save to say that album.pl is the current script
$::albumprog=$ENV{SCRIPT_URI};
# And I figure that album.pl is in the cgi-bin directory
$::cgi_web=$ENV{SCRIPT_URI};
$::cgi_web=~s/(.*)\/.*/$1/;
debug("CGI Web Path : $::cgi_web",2,__LINE__);
# Unfortunately the local album directory could be anywhere
# (see DIRECTORY directive in httpd.conf)
# I think I can handle this by requesting a relative path in album_web
# and an absolute path in album_dir (no need to touch this)
my $tempPath=$ENV{SCRIPT_URI};
$tempPath=~s/^(.*?\/\/.*?)\/.*/$1/;
$::album_web=$tempPath.$::album_web;
debug("Album Web Path : $::album_web",2,__LINE__);
}If you feel the need, search for "
# Numeric variables" and add "
$::GetPathsFromEnv" in the line below. (Should read like this:
[..blabla..]$::shadow_background=$::GetPathsFromEnv=0; but this is just for cosmetics

)
Good Luck...
This patch is meant for album.pl V6.5