Guest_imported
New member
- Jan 1, 1970
- 0
- 0
- 0
Hi,
I have a script which worked well a few days ago and now is driving me crasy. I cropped down the problem to this:
#!/usr/bin/perl
use Net::FTP;
$ftp= Net::FTP -> new ("192.168.111.166"
$ftp->login('spec','heck');
$ftp->quit;
print "Content-type: text/html\n\n";
print "Passed";
exit 0;
Running the script from command line works just fine. If I try to call it via apache (127.0.0.1/cgi-bin/ftptest.pl ) if crashes and prints out this message:
Can't call method "login" on an undefined value at /usr/local/httpd/cgi-bin/ftptest.cgi line 5.
[Fri Nov 3 15:40:42 2000] [error] [client 192.168.111.1] Premature end of script headers: /usr/local/httpd/cgi-bin/ftptest.cgi
It must be something silly. I rebooted, re-built perl perl-5.6.0.
I have a script which worked well a few days ago and now is driving me crasy. I cropped down the problem to this:
#!/usr/bin/perl
use Net::FTP;
$ftp= Net::FTP -> new ("192.168.111.166"
$ftp->login('spec','heck');
$ftp->quit;
print "Content-type: text/html\n\n";
print "Passed";
exit 0;
Running the script from command line works just fine. If I try to call it via apache (127.0.0.1/cgi-bin/ftptest.pl ) if crashes and prints out this message:
Can't call method "login" on an undefined value at /usr/local/httpd/cgi-bin/ftptest.cgi line 5.
[Fri Nov 3 15:40:42 2000] [error] [client 192.168.111.1] Premature end of script headers: /usr/local/httpd/cgi-bin/ftptest.cgi
It must be something silly. I rebooted, re-built perl perl-5.6.0.