The Server keeps executing my CGI script ..Help | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through May 12, 2004 ⬆ |
◄ ► |
Author | Message | |||
jerrel New member Username: Jerrel Post Number: 2 Registered: 02-2004 |
Dear Sir, I have written a smal Perl cgi script, that is called by the NowSMS server 5.0. What the script does, is write the phonenumber and the message of the sender to a file. However i noticed that sometimes when I send a sms to the server, It keeps calling the cgi script over and over again. offcourse the file is being filled with the same data over and over again. If I reboot the machine are restart the Nowsms software,the problem is still there, and keeps calling the script. The only way to stop this is by removing the "command to execute" out of the 2-way settings. I would like to know to know if this is a known bug, and how do i fix it. The follow up is that the script should do a redirect to the sender with a ringtone, but if the problem still popups, the sender will get the same ringtone over and over again )o: Please inform me asap regards Jerrel | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 1987 Registered: 10-2002 |
Hi Jerrel, Sorry that I did not reply to your message earlier. This suggests that the script is not returning a proper HTTP OK response. If the script returns an error response, NowSMS keeps trying again. What happens if you connect to the script from your web browser (passing the appropriate parameters to it)? Does the web browser also report an error? You want to make sure that the script returns a proper OK HTTP response (code 200). Basically, the script should return something like this: HTTP/1.1 200 OK Content-Type: text/plain <blank line> OK (The blank line followed by OK is just a suggestion, it is not required.) | |||
jerrel New member Username: Jerrel Post Number: 3 Registered: 02-2004 |
Yes Bryce, When i connect to the script from the brower with the right parameters. I do get an error message from the server. Can you give me a hind here in my script, and what is should enter for the script to retrun the OK responce regards Jerrel | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 2058 Registered: 10-2002 |
Jerrel, I'm not a Perl expert, so I did a web search for some information ... The following link looks like it should do the trick: http://forums.devshed.com/archive/t-77162 To return a more complete response, try including this at the end of your script: print "HTTP/1.1 200 OK\n" print "Content-type: text/plain\n" print "\n" print "OK\n" If you connect to such a script with your web browser, you should just see the text "OK". -bn | |||
jerrel New member Username: Jerrel Post Number: 4 Registered: 02-2004 |
Dear Bryce, Thanks for all the help. My script return a perfect OK. regards Jerrel |