Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Display the data passed from php

by moritz (Cardinal)
on Aug 20, 2007 at 08:58 UTC ( #633744=note: print w/replies, xml ) Need Help??

in reply to Display the data passed from php

What do you mean by The contents of whole page is displayed in the browser?

Are the contents of the perl script displayed in the browser, insted of its output? If that's the case, you have a problem with the configuration of your webserver, not with perl.

And a general hint: to ease debugging of CGI scripts, start them with

#!/usr/bin/perl use warnings; use strict; use CGI::Carp qw(fatalsToBrowser);

And print the header as soon as you can.

Replies are listed 'Best First'.
Re^2: Display the data passed from php
by sandy1028 (Sexton) on Aug 20, 2007 at 09:15 UTC
    Yes the contents are displayed instead of output. Should I specify the path of cgi-bin where it is installed. Cgi-bin directory is in /var/www/cgi-bin which is the path of the server.
      With Apache you can configure any directory to serve perl CGI scripts, but you have to do that manually. (And you have to add the executable flag for the script).

      The apache doc is quite good, and there are many tutorials on the web.

      A reply falls below the community's threshold of quality. You may see it by logging in.

      The simplest way is to move the file to /var/www/cgi-bin and make it executable by doing

      $chmod +x

        Is there any other way to execute. In the configuration # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi pl Should this be uncommented so that the script works

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-01-18 05:38 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (52 votes). Check out past polls.