Re: script working from shell, but not from browser.
[email protected] (alexander simashin) Sun, 20 Dec 2009 11:11:29 +0300
| Newsgroups | perl.beginners.cgi |
|---|---|
| Message-ID | <[email protected]> |
--0015174c45802653b8047b24857d Content-Type: text/plain; charset=ISO-8859-1 > > Hi Alexander, > > Since both scripts work on our server, and not yours, all I can think of is > that it's something specific to your server environment. > I think that too, but can`t understand where is the problem :(. 2009/12/19 David Taiaroa <[email protected]> > Does something simple like this work for you? I'm trying to help you narrow > down where the problem is. > > #!/usr/bin/perl > use CGI ; > $query = new CGI;# CGI > print $query->header; > > my $url = 'http://www.cpan.org'; > use LWP::Simple; > my $content = get $url; > print $content; > > print $query->end_html; > > > I have it at http://joiedevivre.nb.ca/cgi-bin/test3.cgi > > > Dave > > ok. i modify it a little - i added some strings to print something before and after print $content; so now i have print "before print \$content <br>"; print $content; print "after print \$content <br> "; so in shell it is works great, in browser we got - before print $content after print $content ... so the $content is empty. http://62.176.11.182:50235/cgi-bin/test3.cgi P.S. sorry but this is my home VMware server so it could be down for some time. --0015174c45802653b8047b24857d--