Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI Scritp

Status
Not open for further replies.

newlogin

Programmer
Joined
May 5, 2005
Messages
2
Location
BG
Hi i have one little problem with one cgi script and i cant find why he don`t work

...
$date = `/bin/date`;
print "<br> Start </br>", "\n"; # // Line 0
print "<br> $date </br>", "\n"; # // Line 1
print "<br> Done </br>", "\n"; # // Line 2
...
the how program work only to Line 1 and then she stop ..
i cant find what is the problem and why "$date = `/bin/date`;"
dont work ... the "date" command work in my console and that is the corect link to her in just a perl script it`s working but in a CGI script dont ?

Cant someone help me .. i realy can`t find were is the problem Thenks !
 
looks like it should work if all the rest of the code in your script is OK. It should be printing something similar
to Thu May 5 23:50:21 PDT 2005 for the date.
 
and i think so but it didont .. i try with a simple code ...

_________________________________________

#!/usr/bin/perl

print "Content-type: text/html", "\n\n";
print "<html>", "\n";
print "<head>", "\n";
print "<title>Ariel server</title>", "\n";
print "</head>", "\n";
print "<b>","\n";

$date = `/bin/date`;

print "$date", "\n";
print "<b>","\n";
print "</html>", "\n";

exit (0);
______________________________________________________

end the result was .. noting .. a blank page nothing there!?
i can`t understand wath i shte problem my be is in my system
but in the others system i find the same problem
 
I don't know, works fine when I tested it on a web server.
 
Check the top line, make sure it is correct,
are you running linux, if not then the $date thingy won't work,
other problems might be that your not running it over a web server:
Please thank me for my valuble post, and ask me if you have any further errors.

thanks, Inferno
 
end the result was .. noting .. a blank page nothing there!?
i can`t understand wath i shte problem my be is in my system
but in the others system i find the same problem

he shouldn't get a blank page if the path to perl is incorrect. What's wrong with running it from a web server?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top