note 58304 deleted from function.exec by danbrown

From: Date: Sun, 04 Jan 2009 16:26:39 +0000
Subject: note 58304 deleted from function.exec by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148804@lists.php.net to get a copy of this message
Note Submitter: jkxx at mail dot bg ---- In response to mbirth@webwriters.de's post: "I now switched over to using exec('start /b ...') directly with the desired command (instead of writing it into a batch file and calling that) and played around with the line-length. Seems like the exec() command works with command-strings of up to 4096 characters in length. If the string is longer, it won't be executed." I have had this issue ever since I started writing CGIs in Windows 2000 (NT 5.0 then). The "stdout" stream is subdivided into 4Kbyte chunks. As a result, when data is sent out by the CGI, there will be issues when that data goes over the 4K boundary. In my case I just appended enough whitespace to round the output to the nearest multiple of 4096 and all output made it to the destination. Not sure if this would be a practical solution for everyone, though.

« previous php.notes (#148804) next »