[PHP] Help with exec.

2010-03-03 Thread Paul Halliday
I need to pipe some data to an external application. I have this: while ($row = mysql_fetch_array($theData[0])) { $src_ip[] = $row[0]; $dst_ip[] = $row[1]; $sig_desc[] = $row[2]; $rec ++; if ( $rec == $recCount ) { break; } } for ($i = 0; $i

Re: [PHP] Help with exec.

2010-03-03 Thread Richard Quadling
On 3 March 2010 13:01, Paul Halliday paul.halli...@gmail.com wrote: I need to pipe some data to an external application. I have this: while ($row = mysql_fetch_array($theData[0])) {    $src_ip[] = $row[0];    $dst_ip[] = $row[1];    $sig_desc[] = $row[2];    $rec ++;    if ( $rec ==

Re: [PHP] Help with exec.

2010-03-03 Thread Teus Benschop
On Wed, 2010-03-03 at 13:04 +, Richard Quadling wrote: On 3 March 2010 13:01, Paul Halliday paul.halli...@gmail.com wrote: I need to pipe some data to an external application. I have this: while ($row = mysql_fetch_array($theData[0])) { $src_ip[] = $row[0]; $dst_ip[] =

Re: [PHP] Help with exec.

2010-03-03 Thread Paul Halliday
I work by example :) I can't find enough of an example to get me going with this. I have this: $glow = popen('afterglow.pl -c color.properties -s -e 3 -p 1 -l 2000 | neato -Tpng -o /usr/local/www/test.png','r'); how do I feed my array to that? Thanks. On Wed, Mar 3, 2010 at 9:04 AM, Richard

[PHP] Help with exec syntax

2003-11-16 Thread Mark
Php 4.3.4 Win 2000 I am attempting to have the exec function open a file for editing. The file opens, however php hangs until I close the file that was orginally opened. I read in the php manual that states: If you start a program using this function and want to leave it running in the

Re: [PHP] Help with exec syntax

2003-11-16 Thread John W. Holmes
Mark wrote: The syntax I am using is this. system('cmd/c start notepad my.txt', $results); or exec('start notepad my.txt', $results); You shouldn't be using exe() or system() for this, use fopen() to open a file from within PHP for editing. -- ---John Holmes... Amazon Wishlist:

Re: [PHP] Help with exec syntax

2003-11-16 Thread Mark
John W. Holmes wrote: Mark wrote: The syntax I am using is this. system('cmd/c start notepad my.txt', $results); or exec('start notepad my.txt', $results); You shouldn't be using exe() or system() for this, use fopen() to open a file from within PHP for editing. Thanks for the reply. The

[PHP] help please: exec/pasthru/system/popen problem

2001-11-09 Thread Wolfram Kriesing
i was now trying all the examples from the docs but no success yet can someone please help? i want to convert an image to another format i was fread-ing the one image into $image1 so they are binary in there and i want to pass that to imagemagick's convert, using: convert gif:-

[PHP] help with exec()...

2001-10-05 Thread Christian Dechery
I'm running with some trouble with exec(), system() and it's friends... I have a MySQL backup script that somewhere have something like $cmd=mysqldump .. somefile.sql; if( !fopen(somefile.sql,r) ) { print error message }; $cmd is correct... I've copy-pasted it tons of times in the

Re: [PHP] Help w/ exec() on Win2k, IIS5.

2001-03-29 Thread Tobias Talltorp
I have had this problem with exec, passthru with that configuration aswell... To read the files into an array, do this: (http://www.php.net/manual/en/function.opendir.php) ?php if ($dir = @opendir("e:\\dir")) { // Notice the double "\\" while($file = readdir($dir)) { if ($file !="."

[PHP] Help w/ exec() on Win2k, IIS5.

2001-03-28 Thread SHAWN
Using IIS5 on W2K Server, I can't get get the exec() or other similar commands to work. This is what I'm doing - exec( "dir/a-d/b $dir_name", $arFiles ) The array doesn't contain anything! I've tried it with cmd.exe before the command, but it just seems to get stuck in a loop! Can anyone tell