|No such thing as a small change|
Re: CGI questionby 7stud (Deacon)
|on Feb 08, 2013 at 18:15 UTC||Need Help??|
I can run scripts from one book but I can't from the other book.
That should be pretty easy to troubleshoot. What are the differences in the html between the two books? Specifically, you should examine the form's action attribute in the html. Any differences in the paths listed there? Can you use one book's html with the other book's working perl script?
What are the differences in the perl scripts between the two books? Do both books use script names that have the same extension: .cgi v. .pl? Your server may look at a file's extension to decide whether a file is a perl script and should be executed or whether the file should be returned as text.
What server are you using?
Did you make both your perl scripts executable? $ chmod a+x prog.pl
You might need this shebang line:
When you are testing any cgi script, you should send errors to the browser by adding this line:
Otherwise, your perl script will fail silently, and you will have to check your server's logs to discover the error.
What does your server's log file say? Find out where it is located, and look at the last 20 lines or so.
You should always post what error you got, or if you didn't get an error, you should state what you expected to happen, and what actually happened. Do not say, "My program doesn't work. Help!"