This is running on Solaris8, apache1.3.31, php5.0.1 w/safe_mode turned off. I'm not seeing anything in the server logs unfortunately and am inept at php for the most part unfortunately :/
Any idears?
Thx :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-09-23
issue the command
grep -R "CGI" *
and alter all the resulting files:
look for
// get informations about where and who i am
if (isset($HTTP_SERVER_VARS['SCRIPT_URL']) && $HTTP_SERVER_VARS['SCRIPT_URL'] != $HTTP_SERVER_VARS['SCRIPT_NAME']) {
// CGI
$filesystem_root_path = str_replace($HTTP_SERVER_VARS['SCRIPT_URL'], "/", $HTTP_SERVER_VARS['SCRIPT_FILENAME']);
}
else {
// APACHE
$filesystem_root_path = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], "/", $HTTP_SERVER_VARS['SCRIPT_FILENAME']);
}
Made the suggested changes (wrapper.php, and most files within the loader subdir).
So far no changes. I'm trying to play around a bit with the substring matching to see if I can get it pinned down to something, but if anyone has further suggestions i'd be happy to try :)
Thanks for the help chris!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran into the same problem(s) - there are two:
1) Distinguishing between CGI and apche in newer apaches doesn't work properly
2) softlinks / realpath problems.
I have just installed phpAutoGallery on my family’s intranet. It took a couple of hours to get it up and running. I run it on a windows platform with a phpDev installation (PHP4.06 / Apache1.3.20).
When I first installed it I got “Page: /MyPic not found!” error/message. I tried al of the suggestions in this forum to get it up and running but nothing solved my problem.
I then started to analyze the code and found out that I hade problem with the “str_replace” in wrapper.php. What I found out was this:
I found out that I hade problems with capital letters. When I tested the different parts in the “str_replace” function I got this result.
echo ($HTTP_SERVER_VARS['SCRIPT_NAME'] . "<br>\n"); resulted in this string /MyPic/__phpAutoGallery/wrapper.php
and
echo ($HTTP_SERVER_VARS['SCRIPT_FILENAME'] . "<br>\n"); resulted in this string c:/phpdev/www/mypic/__phpautogallery/wrapper.php
When I then checked the result of “str_replace” in the “$filesystem_root_path” variable I found out that it where
c:/phpdev/www/mypic/__phpautogallery/wrapper.php
instead of
c:/phpdev/www/
The “str_replace” function wasn’t able to match the /MyPic/__phpAutoGallery/wrapper.php part with /mypic/__phpautogallery/wrapper.php part.
To solve this problem I renamed every instance of MyPic and phpAutoGallery in the code to mypic and phpautogallery. I even renamed the folders.
After the renaming session the excellent phpAutoGallery worked as it should.
Thanks for some great code helping me sharing all my digital photos with my family in an easy way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As stated by above user also one of the problems at least on this installation on a windows machine, is case sensitivity. That is, the case sensitivity of the str_replace.
$HTTP_SERVER_VARS['SCRIPT_NAME'] is case-sensitive it appears while $HTTP_SERVER_VARS['SCRIPT_FILENAME'] is all lower-case. Therefore preventing any match-up of the two and yielding a reliable root path.
I am now running the gallery with a replacment string replacement function. Works fine however using any form of upper-case in the url-path results in a "not-found" because SCRIPT_FILENAME is all lower-case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just installed the gallery software and modified files, etc as per the installation instructions.
When I go to http://domain.com/photo/image.jpg, I get the following error (note the double forward-slashes):
Page: //path/to/domain.com/photo//photo/image.jpg not found!
[ admin ]
Indexed by phpAutoGallery v0.9.6
Copyright 2003, 2004 Martin Theimer
My .htaccess file looks as such:
RewriteEngine on
RewriteBase /photo/
RewriteCond %{REQUEST_URI} !.*__phpAutoGallery/wrapper\.php.*
RewriteRule .* /photo/__phpAutoGallery/wrapper.php [NE,QSA,L]
This is running on Solaris8, apache1.3.31, php5.0.1 w/safe_mode turned off. I'm not seeing anything in the server logs unfortunately and am inept at php for the most part unfortunately :/
Any idears?
Thx :)
issue the command
grep -R "CGI" *
and alter all the resulting files:
look for
// get informations about where and who i am
if (isset($HTTP_SERVER_VARS['SCRIPT_URL']) && $HTTP_SERVER_VARS['SCRIPT_URL'] != $HTTP_SERVER_VARS['SCRIPT_NAME']) {
// CGI
$filesystem_root_path = str_replace($HTTP_SERVER_VARS['SCRIPT_URL'], "/", $HTTP_SERVER_VARS['SCRIPT_FILENAME']);
}
else {
// APACHE
$filesystem_root_path = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], "/", $HTTP_SERVER_VARS['SCRIPT_FILENAME']);
}
and remove the wohle block, yust leave the line
$filesystem_root_path = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], "/", $HTTP_SERVER_VARS['SCRIPT_FILENAME']);
Seems that newer versions of php/apache don't need any special handling more.
chris
Made the suggested changes (wrapper.php, and most files within the loader subdir).
So far no changes. I'm trying to play around a bit with the substring matching to see if I can get it pinned down to something, but if anyone has further suggestions i'd be happy to try :)
Thanks for the help chris!
BTW, the changes outlined in the below thread (namely using realpath) fixed my problem:
http://sourceforge.net/forum/forum.php?thread_id=1118711&forum_id=325021
Gotta love forums :)
I ran into the same problem(s) - there are two:
1) Distinguishing between CGI and apche in newer apaches doesn't work properly
2) softlinks / realpath problems.
Here is a patch:
http://www.morch.com/misc/phpAutoGallery/
Peter Mrch
Hi,
I have just installed phpAutoGallery on my family’s intranet. It took a couple of hours to get it up and running. I run it on a windows platform with a phpDev installation (PHP4.06 / Apache1.3.20).
When I first installed it I got “Page: /MyPic not found!” error/message. I tried al of the suggestions in this forum to get it up and running but nothing solved my problem.
I then started to analyze the code and found out that I hade problem with the “str_replace” in wrapper.php. What I found out was this:
In the code part
else {
// APACHE
$filesystem_root_path = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], "/", $HTTP_SERVER_VARS['SCRIPT_FILENAME']);
I found out that I hade problems with capital letters. When I tested the different parts in the “str_replace” function I got this result.
echo ($HTTP_SERVER_VARS['SCRIPT_NAME'] . "<br>\n"); resulted in this string /MyPic/__phpAutoGallery/wrapper.php
and
echo ($HTTP_SERVER_VARS['SCRIPT_FILENAME'] . "<br>\n"); resulted in this string c:/phpdev/www/mypic/__phpautogallery/wrapper.php
When I then checked the result of “str_replace” in the “$filesystem_root_path” variable I found out that it where
c:/phpdev/www/mypic/__phpautogallery/wrapper.php
instead of
c:/phpdev/www/
The “str_replace” function wasn’t able to match the /MyPic/__phpAutoGallery/wrapper.php part with /mypic/__phpautogallery/wrapper.php part.
To solve this problem I renamed every instance of MyPic and phpAutoGallery in the code to mypic and phpautogallery. I even renamed the folders.
After the renaming session the excellent phpAutoGallery worked as it should.
Thanks for some great code helping me sharing all my digital photos with my family in an easy way.
As stated by above user also one of the problems at least on this installation on a windows machine, is case sensitivity. That is, the case sensitivity of the str_replace.
$HTTP_SERVER_VARS['SCRIPT_NAME'] is case-sensitive it appears while $HTTP_SERVER_VARS['SCRIPT_FILENAME'] is all lower-case. Therefore preventing any match-up of the two and yielding a reliable root path.
I am now running the gallery with a replacment string replacement function. Works fine however using any form of upper-case in the url-path results in a "not-found" because SCRIPT_FILENAME is all lower-case.