mbkarmakar2004
10-08-2007, 06:02 AM
I am facing a problem in running a perl program in web browser in linux machines... A simple program i hav tried 2 run like dis:-
#!/usr/bin/perl -w
use CGI;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
$cgi=new CGI();
print $cgi->header();
warningsToBrowser(1);
unlink("/var/www/cgi-bin/flag.txt");
open (FLAG,">/var/www/cgi-bin/flag.txt");
print FLAG "flag=1;";
close(FLAG);
We have many machines containing fedora core 4 and 6 linux in our lab...But the above program ,when i run in web browser,is running successfully in only 2 machines (i fedora core 4 n other one 6)...but r not running in other machines although all have the same configuration i.e.,the file "flag.txt" is not being created in those machines....but when i am running that in terminal by the perl command it is running i.e.,the file is being created....
Do i need 2 change any setting or have 2 write anything more 2 make the program run in all machines?????
:confused: Plz guys help me...... Plzzzzzzz.....
#!/usr/bin/perl -w
use CGI;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
$cgi=new CGI();
print $cgi->header();
warningsToBrowser(1);
unlink("/var/www/cgi-bin/flag.txt");
open (FLAG,">/var/www/cgi-bin/flag.txt");
print FLAG "flag=1;";
close(FLAG);
We have many machines containing fedora core 4 and 6 linux in our lab...But the above program ,when i run in web browser,is running successfully in only 2 machines (i fedora core 4 n other one 6)...but r not running in other machines although all have the same configuration i.e.,the file "flag.txt" is not being created in those machines....but when i am running that in terminal by the perl command it is running i.e.,the file is being created....
Do i need 2 change any setting or have 2 write anything more 2 make the program run in all machines?????
:confused: Plz guys help me...... Plzzzzzzz.....