LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-11-2006, 06:19 PM   #1
lhought
LQ Newbie
 
Registered: Oct 2006
Posts: 2

Rep: Reputation: 0
CGI executed 2 times when form is posted


I have a CGI that executes properly on Red Hat 8.0 using Apache 2.0.40.
However, that same CGI on Red Hat Enterprise executes twice each time the form is submitted. I have tried 2 different versions of Apache with no difference. The CGI is written in C and call the execl() function. When I check the Apache access_log, it shows that the CGI was called two times in rapid succession. I added some code to capture the process ID of the parent and write that to a file called /tmp/test[ppid] where ppid is the parent process ID. There are always 2 files with different process ID created.
Anyone had a similar issue? I am almost convinced that it is not an Apache issue, but rather something that is happening at the Operating System level.
 
Old 10-12-2006, 04:25 PM   #2
petersum
Member
 
Registered: May 2006
Location: Karachi, Pakistan
Posts: 140

Rep: Reputation: 15
What "form" is probably the important question. Is it a standard HTML form? Or are you using some sort of JavaScript verify and submit process? As an experienced webmaster, I must recommend a javascript submit system, otherwise mouse button bounce on a "Submit" button plays havoc.
Who is submitting the form? You, or other persons?
Give some more details.
 
Old 10-13-2006, 07:21 AM   #3
lhought
LQ Newbie
 
Registered: Oct 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Your instincts were correct. I had already set up javascript to do form verification and submission, but I used "onsubmit return function(this)" and had a return value of true at the end of the function, even though I submitted the form within the function. I changed the return value to false, and the problem was solved. I am not sure why I did not encounter an error on my other servers.
 
  


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
# of times loops are executed leroy27336 Programming 10 09-14-2004 04:07 AM
Exec CGI within a form field newuser455 General 0 09-12-2004 01:50 PM
hotplug script executed 3 times Borelian Linux - Software 1 06-28-2004 11:46 PM
cgi is displayed and not executed sterrenkijker Linux - Newbie 3 06-12-2004 02:42 AM
CGI guestbook cant see form amp2000 Programming 2 10-31-2001 01:37 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 12:34 AM.

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