LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2004, 05:15 PM   #1
doza
Member
 
Registered: Jan 2004
Distribution: Redhat
Posts: 31

Rep: Reputation: 15
Apache: png file in CGI directory


I recently installed some software on my webserver (Fedora Core 2 running Apache 1.3) that runs in the cgi-bin. It generates graphs as png files in a subdirectory off of the cgi-bin

For example:
Program sits in /cgi-bin/prog/
Writes png files to /cgi-bin/prog/images

When you try to view the images in the web browser, they appear as broken images. If I move the images to the folder:

/images (directly under htdocs)

it works fine and I can see them. I cannot really configure the program as it was a download. I think that Apache is trying to execute the png or something which is why it is appearing as broken. Is there a way to allow png's to sit under cgi-bin without breaking them in a browser?

Thanks
 
Old 08-26-2004, 05:17 PM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
By broken do you mean an invalid link icon? Maybe the permissions of the files or directories isnt right for the apache user to view them?
 
Old 08-27-2004, 08:05 AM   #3
doza
Member
 
Registered: Jan 2004
Distribution: Redhat
Posts: 31

Original Poster
Rep: Reputation: 15
I don't think it is a permission issue. When I try to view the image from the cgi-bin directory, I get a 500 error and this appears in the Apache error_log:

[Fri Aug 27 09:00:05 2004] [error] (8)Exec format error: exec of /usr/local/apache/cgi-bin/rrdmon/images/Localhost+2583+7200+linux+ping+300.png failed
[Fri Aug 27 09:00:05 2004] [error] [client 10.0.32.43] Premature end of script headers: /usr/local/apache/cgi-bin/rrdmon/images/Localhost+2583+7200+linux+ping+300.png

That error appears when the permissions on the image are 755. When I change the permissions to 644, I get a 403 error:

You don't have permission to access /cgi-bin/rrdmon/images/Localhost+2583+7200+linux+ping+300.png on this server.

Any ideas? This is really starting to drive me crazy because it is probably something simple that I missed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache is only showing one file in the directory niverson Linux - Software 6 02-27-2005 05:39 PM
CGI File Not Executing on Apache Server kaplan71 Linux - Software 2 10-21-2004 07:12 AM
Probs running .jar file via CGI script under Apache blimbo Programming 1 07-22-2004 10:29 AM
apache displays .cgi file instead of executing it hewsonism Linux - Software 2 01-13-2004 09:12 PM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration