[PHP] popen and pclose. Something changed in 4.4.2 ! ....Fixed

2006-06-21 Thread Venkatesh M. S.
On windows, allow Apache service "to interact with the desktop"... in the services manager GUI Rgds Venkat ** Greetings! I was using popen and pclose on a previous version of PHP on Windows with an older version of Apache (2.x). ( I think it was 4.4.1 but will need to check as

Re: [PHP] popen and pclose. Something changed in 4.4.2 !

2006-06-12 Thread Richard Lynch
I can only suggest you change the "default" settings on the MS-DOS application thingie... Right-click the MS-DOS icon in the Start menu, mess with settings like "run in background" etc. I suspect that it is a configuration of MS-DOS window issue, and has nothing to do with PHP. On Mon, June 12

[PHP] popen and pclose. Something changed in 4.4.2 !

2006-06-12 Thread Venkatesh M. S.
Greetings! I was using popen and pclose on a previous version of PHP on Windows with an older version of Apache (2.x). ( I think it was 4.4.1 but will need to check as i am not sure). pclose(popen("start " . $exe . " " . $args, "r")) Where $exe is my path to the batch file and $args are the arg

Re: [PHP] popen() in 4.3.2

2003-06-08 Thread Jeff Harris
Wow. 6 minutes for a response. Of course, I thought my error was in the popen(), not fread(), so I didn't even check there. I've just fixed the code, and it works! Thanks, Philip. On Jun 8, 2003, "Philip Olson" claimed that: | |PHP 4.3.0-1 has a bug that made your previous code "work", |have a l

Re: [PHP] popen() in 4.3.2

2003-06-07 Thread Philip Olson
PHP 4.3.0-1 has a bug that made your previous code "work", have a look at the fread() docs for why, here's a quote: "Note: When reading from network streams or pipes, such as those returned when reading remote files or from popen() and proc_open(), reading will stop after a packet i

[PHP] popen() in 4.3.2

2003-06-07 Thread Jeff Harris
My webhost just upgraded to php 4.3.2, and now I have a problem with popen. I'm opening an output buffer then piping it through htmltidy to make nice looking output. This code worked perfectly before the upgrade, now "strlen( $newstr )" is only getting back 4096 bytes. Is anybody else having th

Re: [PHP] popen(); problem, the function don`t finds the command......

2002-04-11 Thread Mike Gohlke
Hermann Bier wrote: Hermann, Even in CLI scripts, you must enclose the php script in delimiters. > Hi!! > > i`ve wrote a little script to run under shell, so this script: > #!/usr/bin/php > $saslpasswd = "/usr/sbin/saslpasswd -p $username"; > $saslproc = popen($saslpasswd,"w"); > fputs($saslpr

Re: [PHP] popen(); problem, the function don`t finds the command......

2002-04-11 Thread Barry C. Hawkins
Hermann, Maybe change: $saslpasswd = "/usr/sbin/saslpasswd -p $username"; to: $saslpasswd = "/usr/sbin/saslpasswd -p " . $username; I assume $username is being assigned somewhere. Regards, -- Barry C. Hawkins Systems Consultant All Things Computed [EMAIL PROTECTED] On Thu, 11 Apr 2002 14:53

[PHP] popen(); problem, the function don`t finds the command......

2002-04-11 Thread Hermann Bier
Hi!! i`ve wrote a little script to run under shell, so this script: #!/usr/bin/php $saslpasswd = "/usr/sbin/saslpasswd -p $username"; $saslproc = popen($saslpasswd,"w"); fputs($saslproc, $passwd); pclose($saslproc); php-parser gives me the following as output: # sh: /saslpasswd: No such file or

[PHP] popen(); problem, the function don`t finds the command...

2002-04-09 Thread Hermann
Hi!! i`ve wrote a little script to run under shell, so this script: #!/usr/bin/php $saslpasswd = "/usr/sbin/saslpasswd -p $username"; $saslproc = popen($saslpasswd,"w"); fputs($saslproc, $passwd); pclose($saslproc); php-parser gives me the following as output: # sh: /saslpasswd: No such file or

[PHP] popen

2002-02-15 Thread Lau NH
Hi, is anyone know how to make popen command to read and write to a process at the same time? My php script need to call linux command which requires interactive action, or anyone know other possible way of doing it? Regards, Lau NH

[PHP] popen

2001-12-03 Thread Richard Lynch
Please Cc: me with responses. I dunno how soon I'll be able to read php-general again... Short version: If a program doesn't take data from stdin, and you want to get data to it more securely than writing it to a file, is there some combination of exec/popen and/or Un*x redirection <|> that w

[PHP] popen returns true whether script exists or not?

2001-08-14 Thread Tom Hodder
Hi, I'm trying to popen a cgi script that was designed to be open via a SSI include, but cannot because of passing variable restrictions. I'm popening a cgi script and it is returning a process pointer regardless of whether the string passed to it points to anything. Is this the expected respo

[PHP] popen

2001-03-15 Thread aadish
Hi all I used popen to fork a process to password chaning program. The webserver has access to execute that program. This is the snippet $pp = popen("passwd user", "w"); fwrite($pp, "password\n"); fwrite($pp, "password\n"); pclose($oo); if i see the log the program executes but the password is

[PHP] popen in safe_mode with pipe

2001-01-17 Thread Lic. Rodolfo Gonzalez Gonzalez
Hello, I need to encode some text using GPG in a PHP program. I've a class wich uses popen like this: //--- start --- // parameters to gpg omited... $command = "echo '$text' | gpg "; $fd = popen("$command","r") if (!$fd) { return -2; } $enc = ""; while (!feof($fd)) { $enc .= fgets($fd