note 58304 added to function.exec

From: Date: Mon, 31 Oct 2005 07:31:30 +0000
Subject: note 58304 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-97858@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.exec.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58304 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58304&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58304&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97858) next »