Do this:

------------snip-----------------
#!/bin/php    (or wherevery you have the php executable binary stored)
<?php
    $pipe = "$username\n$password\n";
    $pwauth = "/usr/local/apache/bin/pwauth";
    if($cmd = popen ($pwauth, "w")) {
            fwrite($cmd, $pipe);
            $status=(pclose($cmd)>>8)&0xFF;
    }
?>
------------snip-----------------
chmod 755 myfile.php

Then just execute "myfile.php" as any other program.



> -----Original Message-----
> From: Marcos [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 25, 2003 6:18 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP script in C SHELL
> 
> 
> I need to execute the archive php below in the server Apache, but I
> perceived that I obtain the waited result if I use csh (C 
> shell) and not
> using bash, somebody could say me as to execute this script in csh?
> 
>         $pipe = "$username\n$password\n";
>         $pwauth = "/usr/local/apache/bin/pwauth";
>         if($cmd = popen ($pwauth, "w")) {
>                 fwrite($cmd, $pipe);
>                 $status=(pclose($cmd)>>8)&0xFF;
>         }
> 
> Thank's
> 
> Marcos
> [EMAIL PROTECTED]
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/03
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to