HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   CGI Script problem (http://www.howtoforge.com/forums/showthread.php?t=22947)

onastvar 4th May 2008 08:14

CGI Script problem
 
I use formmail.pl cgi script for web contact form. When I click on submit I get a blank page with following URL

mydomain.com/cgi-bin/formmail.pl?recipient=info%40mydomain.com&subject= Web+Contact&redirect=http%3A%2F%2Fwww.mydomain.com %2Fthanks.html&Name=Your+Name&E-mail=Your+Email&textarea=kjk%0D%0A

I'm running CentOS 5.1 with ISPConfig - I enabled CGI Script option in ISPConfig

Please assist.
Thank You!

falko 5th May 2008 18:04

Are there any errors in Apache's error log?

onastvar 8th May 2008 03:02

CGI Script problem - apache error log
 
Falko, Thanks for your reply!
I don't see any errors (I'm pasting my apache error_log) I appologize - log is kind of long

Thanks
onastvar

Code:

//etc/http/logs/error_log

[Sun May 04 04:02:25 2008] [notice] Digest: generating secret for digest authentication ...
[Sun May 04 04:02:25 2008] [notice] Digest: done
[Sun May 04 04:02:25 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sun May 04 04:02:26 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Mon May 05 19:47:18 2008] [notice] SIGHUP received.  Attempting to restart
[Mon May 05 19:47:18 2008] [notice] Digest: generating secret for digest authentication ...
[Mon May 05 19:47:18 2008] [notice] Digest: done
[Mon May 05 19:47:18 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon May 05 19:47:19 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Mon May 05 19:48:30 2008] [notice] SIGHUP received.  Attempting to restart
[Mon May 05 19:48:30 2008] [notice] Digest: generating secret for digest authentication ...
[Mon May 05 19:48:30 2008] [notice] Digest: done
[Mon May 05 19:48:30 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon May 05 19:48:30 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Mon May 05 19:49:00 2008] [notice] SIGHUP received.  Attempting to restart
[Mon May 05 19:49:00 2008] [notice] Digest: generating secret for digest authentication ...
[Mon May 05 19:49:00 2008] [notice] Digest: done
[Mon May 05 19:49:00 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon May 05 19:49:00 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Mon May 05 19:49:33 2008] [notice] SIGHUP received.  Attempting to restart
[Mon May 05 19:49:33 2008] [notice] Digest: generating secret for digest authentication ...
[Mon May 05 19:49:33 2008] [notice] Digest: done
[Mon May 05 19:49:33 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon May 05 19:49:33 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Mon May 05 20:06:29 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/favicon.ico
[Mon May 05 20:08:38 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/web4
[Mon May 05 20:08:45 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:08:50 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/www
[Mon May 05 20:09:08 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/www
[Mon May 05 20:09:12 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:09:58 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:13:12 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:13:15 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:13:40 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:13:45 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:31:34 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:31:57 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:32:00 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:32:04 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:32:08 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/var
[Mon May 05 20:43:05 2008] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Mon May 05 20:43:06 2008] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon May 05 20:49:58 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:50:03 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:50:05 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:50:11 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:50:15 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:55:56 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:56:05 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 20:56:10 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/www
[Mon May 05 20:56:15 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/www
[Mon May 05 20:56:33 2008] [error] [client 10.1.10.54] File does not exist: /var/www/sharedip/home
[Mon May 05 22:55:45 2008] [notice] SIGHUP received.  Attempting to restart
[Mon May 05 22:55:45 2008] [notice] Digest: generating secret for digest authentication ...
[Mon May 05 22:55:45 2008] [notice] Digest: done
[Mon May 05 22:55:45 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon May 05 22:55:45 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 02:21:00 2008] [notice] caught SIGTERM, shutting down
[Tue May 06 02:21:00 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 06 02:21:01 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 02:21:01 2008] [notice] Digest: done
[Tue May 06 02:21:01 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 02:21:01 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 02:34:58 2008] [notice] caught SIGTERM, shutting down
[Tue May 06 02:35:00 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 06 02:35:00 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 02:35:00 2008] [notice] Digest: done
[Tue May 06 02:35:00 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 02:35:00 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 09:17:14 2008] [notice] caught SIGTERM, shutting down
[Tue May 06 09:17:15 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 06 09:17:16 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 09:17:16 2008] [notice] Digest: done
[Tue May 06 09:17:16 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 09:17:17 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 09:22:22 2008] [notice] caught SIGTERM, shutting down
[Tue May 06 09:22:23 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 06 09:22:24 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 09:22:24 2008] [notice] Digest: done
[Tue May 06 09:22:24 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 09:22:24 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 09:26:12 2008] [notice] caught SIGTERM, shutting down
[Tue May 06 09:26:12 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 06 09:26:13 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 09:26:13 2008] [notice] Digest: done
[Tue May 06 09:26:13 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 09:26:13 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 15:16:15 2008] [notice] caught SIGTERM, shutting down
[Tue May 06 15:16:16 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 06 15:16:17 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 15:16:17 2008] [notice] Digest: done
[Tue May 06 15:16:17 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 15:16:17 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue May 06 18:55:09 2008] [notice] SIGHUP received.  Attempting to restart
[Tue May 06 18:55:09 2008] [notice] Digest: generating secret for digest authentication ...
[Tue May 06 18:55:09 2008] [notice] Digest: done
[Tue May 06 18:55:09 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue May 06 18:55:09 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Wed May 07 01:16:16 2008] [notice] caught SIGTERM, shutting down
[Wed May 07 01:16:18 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 07 01:16:18 2008] [notice] Digest: generating secret for digest authentication ...
[Wed May 07 01:16:18 2008] [notice] Digest: done
[Wed May 07 01:16:18 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed May 07 01:16:19 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations


catdude 8th May 2008 21:54

What does the access log show for the HTTP return code for access to that page?

onastvar 11th May 2008 09:13

CGI Script (error log)
 
Thanks!
I'm getting the following in my error log, any idea why and how could I fix it?

suexec policy violation: see suexec log for more details, referer: http://www.mydomain.com/contact.html

Premature end of script headers: feedback.pl, referer: http://www.mydomain.com/contact.html

catdude 12th May 2008 15:05

What is in your suexec.log file?

What happens when you try to run feedback.pl from the command line?

onastvar 12th May 2008 18:03

/var/log/httpd/suexec.log
 
Thanks catdude!
Here's my suexec.log (/var/log/httpd/suexec.log)
I'm not sure how to run feedback.pl from the command line? Could you guide me?

Code:

[2008-05-11 20:34:13]: uid: (10027/web5_user) gid: (10005/10005) cmd: feedback.pl
[2008-05-11 20:34:13]: directory is writable by others: (/var/www/web5/cgi-bin)
[2008-05-11 22:06:58]: uid: (10027/web5_user) gid: (10005/10005) cmd: feedback.pl
[2008-05-11 22:06:58]: directory is writable by others: (/var/www/web5/cgi-bin)
[2008-05-11 22:14:45]: uid: (10027/web5_user) gid: (10005/10005) cmd: feedback.pl
[2008-05-11 22:14:45]: directory is writable by others: (/var/www/web5/cgi-bin)
0:34:13]: uid: (10027/web5_user) gid: (10005/10005) cmd: feedback.pl


catdude 12th May 2008 18:09

Ok, that suggests your next step. What are the permissions on /var/www/web5/cgi-bin? Is it by any chance world writeable? If so, try changing the permissions to something like 755 or 775 (looks like mine at 775).

To check whether this is it, after changing the permissions just run the script from the command line and see if reports the same error.

onastvar 21st May 2008 07:00

how to run pl file from command prompt
 
Catdude i changed permissions to 775 and I get same result. How would I run PL file within terminal.

Ben 21st May 2008 07:55

Quote:

Premature end of script headers: feedback.pl
Does the script start with something like the following after the use ... lines?

Quote:

print "Content-type: text/html\n\n";
If not please try adding this.


All times are GMT +2. The time now is 08:01.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.