This is my second request for help with this problem. I have followed the suggestions given the first time and made some progress but I still have one final problem/question. I have two CGI scripts that don't work. One is the standard Set-Cookie, examples can be found all over the net, that sets a cookie and prints "Your cookie name is set." The other is an automatic installation script that comes from commerce-cgi.com and is for installing their CGI shopping cart. Both of these scripts are now located in /var/www/cgi-bin/ and the folder and the scripts are set to apache:apache 755. BTW a setting of root:root also fails exactly the same way. If I run either of these scripts from a browser using www.domain.com it fails. If I run it from a browser using www.domain.com/cgi-bin/install.cgi or www.domain.com/cgi-bin/techtest.cgi it works. I have tried using a one line index.shtml file with that one line being either <!--#include virtual="/cgi-bin/install.cgi"--> or <!--#exec cgi="/cgi-bin/install.cgi"--> and they both fail. They do find and execute the script. The set cookie script prints the "Your cookie name is set." message OK but the cookie is not sent to the browser. The install script loads the first HTML page ok but does not load the second page. I had a friend-of-a-friend IT guy that I trust look at everything. He hasn't found anything obvious. If he tries to run either of these scripts from his computer, it works OK. Can someone here help me understand why this is happening? Mel PS posts in other online places (as suggested here) did not get any replies.
tech wrote:> If I run either of these scripts from a browser using www.domain.com it > fails. If I run it from a browser using > www.domain.com/cgi-bin/install.cgi or > www.domain.com/cgi-bin/techtest.cgi it works.Yes. Look at ScriptAlias in the config. And at the SELinux contexts in that directory.> I have tried using a one line index.shtml file with that one line being > either <!--#include virtual="/cgi-bin/install.cgi"--> or <!--#exec > cgi="/cgi-bin/install.cgi"--> and they both fail.Yikes! Calling www.domain.com/cgi-bin/install.cgi is the correct way, using SSI together with cgi scripts calls for trouble. And next time you ask something please include *error* messages. Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20081017/2877d4d3/attachment-0003.sig>
> Ralph Angenendt wrote: > And next time you ask something please include *error* messages.Ralph, Sorry. I should have said that there is nothing in the error log. I have entries in the access log but not the error log. I had one before but I did a complete format and re-install and it is gone. Let me also say that SELinux is OFF. ScriptAlias is set and I believe it is correct. I have gone over httpd.conf carefully and had someone else look at it. The obvious things seem to be OK. I did go back and verify one thing, when the IT guy was testing and it worked for him, he was using www.domain.com/cgi-bin/install.cgi and not just www.domain.com. That also failed for him.
--- On Fri, 10/17/08, tech <tech at laamail.com> wrote:> From: tech <tech at laamail.com> > Subject: [CentOS] CGI configuration - second post > To: centos at centos.org > Date: Friday, October 17, 2008, 1:12 AM > This is my second request for help with this problem. I have > followed > the suggestions given the first time and made some progress > but I still > have one final problem/question. > > I have two CGI scripts that don't work.Mel, This is a feature, not a bug. Take a look at how httpd configures for cgi: #grep cgi /etc/httpd/conf/httpd.conf notice that a handler is set for /var/www/cgi-bin -- Mark __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com