Hi,
Am trying to fix a bug in the Perl CGI code.
Below is the message
Status: 500
Content-type: text/html
<h1>Software error:</h1>
<pre>fileparse(): need a valid pathname at login.cgi line 34.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error
+ message
and the time and date of the error.
</p>
[Fri Jul 6 21:02:17 2018] login.cgi: fileparse(): need a valid pathna
+me at login.cgi line 34.
please help
#!/usr/bin/perl -w
#use strict;
use DBI;
use Carp;
use File::Path;
use File::stat;
use File::Basename;
use Cwd;
use CGI;
use CGI::Carp qw(carpout fatalsToBrowser);
use Digest::MD5 qw(md5_hex);
#use lib "$ENV{'DOCUMENT_ROOT'}/home/honeyisl/public_html/cgi-bin/sche
+dule";
use lib "/home/honeyisl/public_html/cgi-bin/schedule";
use SUBS;
use DBDAT;
no warnings 'uninitialized';
#use lib "$ENV{'DOCUMENT_ROOT'}/home/honeyisl/public_html/cgi-bin";
use lib "/home/honeyisl/public_html/cgi-bin";
use Date::Manip;
use Apache::DBI ();
use Mail::Mailer;
use Exporter;
# P A R A M S A N D V A R I A B L E S
my $q = CGI->new;
my $action=$q->param("submit") || 'Annonymous';
my $user=$q->param('user');
my $msg=$q->param('msg');
#--------------------------------------------------------------------
my $md5 = Digest::MD5->new;
my $digest;
my $dir=dirname($ENV{'SCRIPT_FILENAME'});
#my $dir=cwd(dirname($ENV{"SCRIPT_FILENAME"}));
The error is coming from line
" my $dir=dirname($ENV{'SCRIPT_FILENAME'});"
Please help
Thanks in advance