CGI-BIN in any dir not work

SeFlow

Verified User
Joined
Aug 15, 2004
Messages
14
hi,
i search a lot in this forum but i still having cgi issue.

i want run one cgi script in a /home/admin/public_html/web/ directory, but i continue to see "500 internal ....." . Script work well, because if i insert it in cgi-bin default dir i see it without problem. In some thread i see to create .htaccess file and insert in it this:

Options +ExecCGI
AddHandler cgi-script .cgi .pl


but nothing change, i try to add it in httpd.conf but same thing.

My error is:

Premature end of script headers:


Regards, Matteo
 
Check Apache error log for the hints and post the relevant lines here.

Most common problems:
- user id or group id of the script doesn't match user id / group id for the domain
- permissions of the directory and the script itself
 
hi,
these are my logs when i try to start script fro browser:

Premature end of script headers: /home/admin/domains/seflow.net/public_html/helpdesk/rtg/web/rtgplot.cgi


Premature end of script headers: /home/admin/domains/seflow.net/public_html/helpdesk/rtg/web/rtgplot.cgi

i try to set all in 777 (just for made a test), and as user:group: admin:apache and admin:admin, but still same log.


Regards
 
That's the wrong log file I guess.

Try
Code:
tail  /var/log/httpd/suexec_log

You have to make sure that the whole path helpdesk/rtg/web/rtgplot.cgi is owned by user: admin, group admin, all the dircetories in this path have at least executable permission and the script is 755.
 
i tryed using 777 and during read in other forum i discovered that apache refuse it, infact i keep script and dir ay 755 (as you sayd) and now work well.

Thanks for your help.
 
Back
Top