Re: howto call php script from cgi script
| From: | Michael Virnstein | Date: | Thu, 11 Apr 2002 16:29:56 +0000 |
| Subject: | Re: howto call php script from cgi script | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92609@lists.php.net to get a copy of this message | ||
doesn't it have to be:
################################
# md5.php
################################
#!/usr/bin/php (path to your php)
<?php
//your code
?>
and have you test your cgi using "su - webuser" before?
perhaps some file permission problems, when called from the web.
"Sanjay" <sanjays@softhome.net> schrieb im Newsbeitrag
news:017f01c1e15f$67d24220$0200a8c0@piii...
> Hi,
>
> I am a cgi programmer and have written a small php script (md5.php) for
md5
> password encryption which is being called from a cgi (temp.cgi) file. Now,
when
> I try to excute the temp.cgi script from command line it works well and
returns
> me the expected value. But, the same cgi script doesn't return anything
when
> trying to execute from the web.
>
> Any help would be highly appreciated.
>
> Regards,
> Sanjay
>
>
> ### temp.cgi
>
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> $passwd="testpass";
> $p=
/usr/bin/php /full/path/md5.php pass=$passwd|tail -1;
> print "pass is $p\n";
>
>
> #### md5.php
>
> <?
> $pass1=md5("$pass");
> #return "$pass1";
> print "$pass1";
> ?>
>