CGI problem, works at the command line, but not on the browser
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[Mon Oct 03 03:03:21 2005] [notice] caught SIGTERM, shutting down
[Mon Oct 03 03:03:22 2005] [notice] core dump file size limit raised to 4294967295 bytes
[Mon Oct 03 03:03:23 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Oct 03 03:03:24 2005] [notice] Digest: generating secret for digest authentication ...
[Mon Oct 03 03:03:24 2005] [notice] Digest: done
[Mon Oct 03 03:03:24 2005] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Oct 03 03:03:24 2005] [notice] LDAP: SSL support unavailable
[Mon Oct 03 03:03:25 2005] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Oct 03 03:03:25 2005] [notice] Apache/2.0.54 (Fedora) configured -- resuming normal operations
[Mon Oct 03 03:03:30 2005] [error] [client 192.168.1.100] Premature end of script headers: first.pl
last bit of ssl_error
[Mon Oct 03 03:00:11 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Oct 03 03:03:23 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Oct 03 03:03:25 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
suexec log
[2005-10-03 02:41:35]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 02:41:35]: file is writable by others: (/var/www/cgi-bin/first.pl)
[2005-10-03 03:03:30]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 03:03:30]: file is writable by others: (/var/www/cgi-bin/first.pl)
Your problem is the last line of your suexec log. The script first.pl is writable by others. This is a security measure that comes with suexec. It is protecting you from yourself. You should...
also, I noticed in your profile it says CV-67 from Jacksonville... I guess you're on the JFK? I know somebody on there... or at least he was last time I checked.... Charles Gray. He's my ex-wife's brother. No idea what he does, but that's where he was stationed.
Hmmm, I'm not sure... it must be trying to tell us that the cgi-bin has wrong ownership. Maybe you can browse around there and see. Is your cgi-bin still under /var/www/html/cgi-bin? Maybe do...
chown bftt.bftt /var/www/html/cgi-bin.
Also, you may want to restart apache instead of rebooting the whole machine.
.....so Gray does not ring a bell. i have only been onboard for a year though. i think there are like 2300 people onboard so.... sorry to hear X. i am getting maried 110505 myself.
The log tells me that your problem is no longer suexec related. Whatever is wrong now is something to do with your script itself. Suexec seems to be working fine.
Gray might be on another ship now. He was on there about 4 years ago, but I dont know if he's still there now. Anyway, I'm remarried now, so its all good. heh.
Check your other logs and see if they give you any clues. You may also want to add the -w flag to the first line of your script. Like...
#!/usr/bin/perl -w
which may give you some added details in the log files of what could be wrong.
Sorry, I'm off to bed now, but I'll catch back up with you tomorrow.
Hmmm, I'm afraid it would be hard to say more without seeing the script. One thing I commonly do when I have a situation like this is to remove the guts of the script and do the bare minimum. Like save another version of the script and remove all but a "print" statement. If the script still doesn't work, then you know its a very fundamental problem. It could be a CR/LF problem. Try doing this (command line)...
vi -b first.pl
If you see a bunch of ^M characters at the end of each line, you'll need to delete them and save the file. I hope you're familiar with vi! If not, let me know and I can give you the crash course, but basically you need to open the file in a text editor and change the carriage returns into line feeds.
ya, i have no clue about vi. i use kedit and kate for writing scripts. the script was one that i pulled from the apache web site. i did run the command you said to and it did this...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.