Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Ajax and CGI problem

by heatblazer (Scribe)
on Mar 05, 2012 at 19:48 UTC ( [id://957963]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Ajax and CGI problem
in thread Ajax and CGI problem

I saw that, and tried to turn it on with Options ExecCGI in httpd.conf but nothing happens :(
[Mon Mar 05 22:47:08 2012] [notice] Apache/2.2.21 (Unix) DAV/2 mod_ssl +/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2 +.0.5 Perl/v5.10.1 configured -- resuming normal operations [Mon Mar 05 22:47:18 2012] [error] [client 127.0.0.1] Premature end of + script headers: ex2, referer: http://localhost/form1.html
Now I get error 500. I`ve browsed the net and they say to type in  Options ExecCGI but where to????

Replies are listed 'Best First'.
Re^5: Ajax and CGI problem
by Your Mother (Archbishop) on Mar 05, 2012 at 20:41 UTC

    Premature end of script headers is the error you get when you aren't printing headers; though it's not the only way to get it. Are you sure you are printing your call to $q->header? At this point, I would recommend adding-

    use CGI::Carp qw( fatalsToBrowser warningsToBrowser );

    -to the top of your script. But only in development. Never in production.

Re^5: Ajax and CGI problem
by aaron_baugher (Curate) on Mar 05, 2012 at 23:03 UTC

    For a better answer, ask in an Apache forum, but: You'll need to add 'Options ExecCGI' in a Directory section of your httpd.conf (or equivalent config file) that oversees the directory containing your script. You may also have to tell Apache to execute scripts with a certain file extension, although there are other ways to do that as well. It's also possible to put the Options setting in an .htaccess file, but only if you've used AllowOverride properly in the main httpd config. So there are several different ways to make it work, and an equal number of ways to break it.

    Aaron B.
    My Woefully Neglected Blog, where I occasionally mention Perl.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://957963]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-24 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found