Member
Member
emil2k   29-12-2008, 19:15
#1

I have zenphoto installed in my main directory (/) with mod_rewrite enabled and everything works fine.

Now I'm trying to run a completely unrelated script in my cgi_bin directory (/cgi-bin) I tried editing the htaccess file so that all requests to localhost/p are directed to the cgi-bin directory but all I get is an object notfound error with the following text ...

I placed a simple gif in the cgi-bin and I try to request it by localhost/p/model.gif

The Zenphoto object you are requesting cannot be found. Album: p Image: model.gif Page: index
I know basics of htaccess and this my current htaccess I added the bolded line ...

`

htaccess file version 1.2.2.0;


Update the above and the define in setup.php when you make changes to the rewrite rules!


NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory. (Or let setup.php do it for you!)


RewriteEngine On

!!! Change this to the web path (eg: http://www.yourwebsite.com/photos --> /photos) !!!


RewriteBase /


RewriteRule ^admin/?$ zp-core/admin.php [R,L]

RewriteRule ^p/(.+)$ cgi-bin/$1 [L] ##########

Administrator
Administrator
acrylian   29-12-2008, 20:07
#2

Why don't you link directly? That should work, too.

Member
Member
emil2k   29-12-2008, 20:15
#3

Same error happens when I try to go directly except the error is ...

`

The Zenphoto object you are requesting cannot be found.

Album: cgi-bin

Image: model.gif

Page: index

`

Member
Member
sbillard   29-12-2008, 23:35
#4

You should not need to do anything to run a script in some other folder. (That is exactly how the admin backend runs.)

The standard zenphoto .htaccess file will check to see if the page referneced by the URI is an existing file. If so it will just load that file. If the file is not found you will get the zenphoto 404 error.

So the indication you are getting is that the .htaccess processing cannot find the target file.

Member
Member
emil2k   29-12-2008, 23:45
#5

Thats the weird thing its only the cgi-bin folder, I put another folder named c with the same model.gif file and I was able to access it.

Any ideas as to what is happening in the cgi-bin that is causing this?

Member
Member
sbillard   29-12-2008, 23:56
#6

Probably access security on that file. It is not normal to directly link to scripts in the cgi-bin folder. Normally other scripts load resources from there.

Member
Member
emil2k   30-12-2008, 00:01
#7

Should I change the permissions or something they are already on 755? What can I do?

Another thing I noticed is that it actually runs the file if it is a .pl (through log file) but it still displays the zp Object not found page.

Member
Member
emil2k   30-12-2008, 20:10
#8

I fixed this, for other who may have this problem ... try changing the .pl to .cgi ...

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.