Results 1 to 6 of 6
I recently installed and started using Apache for my home computer. I have a Perl script which reads all the image files in a directory, then displays them as thumbnails. ...
- 12-01-2004 #1Linux Guru
- Join Date
- Mar 2003
- Location
- Wisconsin
- Posts
- 1,907
Apache file permissions, I think
I recently installed and started using Apache for my home computer. I have a Perl script which reads all the image files in a directory, then displays them as thumbnails. I know the script works, b/c I've been using it on my (paid) web-site for months. The problem is there's no images showing up. The tag will be correct [img] /html/photoalbum/album18/2004_0902_082514AA.jpg[/img], but the image says it can't be found. How can it not be found if the Perl script can find it??!! I'm thinking it must be a permission thing then, but I chmod'd everything to 777 including the directory itself and I still get the same error.
http://65.29.162.19/cgi-bin/thumbnails.cgi?album18
Right click > view image gives me:
What's up with that?The requested URL /html/photoalbum/album18/2004_0902_082514AA.jpg was not found on this server.
Thanks for you help,
JeremyRegistered Linux user #346571
"All The Dude ever wanted was his rug back" - The Dude
- 12-01-2004 #2Linux Enthusiast
- Join Date
- Jun 2002
- Location
- San Antonio
- Posts
- 621
What does the appropriate error log say? It should say something about the file not being found, and a full path to the file. If you look at that path, and run an ls on it, you should be able to tell if the file exists. This leads to two solutions, either the file exists, and the permissions are wrong, or the file doesn't exist, and the path is wrong.
Best,
SamuelI respectfully decline the invitation to join your delusion.
- 12-01-2004 #3Linux Guru
- Join Date
- Mar 2003
- Location
- Wisconsin
- Posts
- 1,907
Can you tell me the error log I'm looking for?
Thanks,
JeremyRegistered Linux user #346571
"All The Dude ever wanted was his rug back" - The Dude
- 12-01-2004 #4if you edit your httpd.conf file, it should tell you where the error log file is. generally in the apache root dir and then in the log folder, unless you have changed it. check that and report back
Originally Posted by jeremy1701
- 12-01-2004 #5Linux Enthusiast
- Join Date
- Jun 2002
- Location
- San Antonio
- Posts
- 621
Code:locate httpd.conf | xargs grep ErrorLog
I respectfully decline the invitation to join your delusion.
- 12-02-2004 #6Linux Guru
- Join Date
- Mar 2003
- Location
- Wisconsin
- Posts
- 1,907
Thank you both. It turned out to be a little bit weird, but it's fixed. It must have something to do with the intricacies of where the script is executed from. The Perl portion of the script that reads the directory contents works, but the exact same path in the html portion of the script didn't. opendir('../../photoalbum') opened the directory and read the contents, but the [img]../../photoalbum[/img] didn't. I had to change it to ../photoalbum.
The problem is solved, but I don't understand why. It would seem that the script is run from the location it's called, but generates the page from the top level directory (www) regardless of the script. Is that correct?
JeremyRegistered Linux user #346571
"All The Dude ever wanted was his rug back" - The Dude


Reply With Quote
