RE: [PHP] PHP script in C SHELL

From: Date: Wed, 25 Jun 2003 23:52:16 +0000
Subject: RE: [PHP] PHP script in C SHELL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152896@lists.php.net to get a copy of this message
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:marcos@westnet.com.br] > Sent: Wednesday, June 25, 2003 6:18 AM > To: php-general@lists.php.net > 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 > marcos@westnet.com.br > > > --- > 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 >

« previous php.general (#152896) next »