Bug #80282 [Opn->Fbk]: cannot send binary data to popen

From: Date: Mon, 26 Oct 2020 16:17:44 +0000
Subject: Bug #80282 [Opn->Fbk]: cannot send binary data to popen
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229929@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80282&edit=1 ID: 80282 Updated by: cmb@php.net Reported by: vanherkmarcel at gmail dot com Summary: cannot send binary data to popen -Status: Open +Status: Feedback Type: Bug Package: Filesystem function related Operating System: Windows PHP Version: 7.4.11 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > popen($exe, 'wb') fails I cannot reproduce that. What exactly fails? Is there some error message? Which executable do you call? Previous Comments: ------------------------------------------------------------------------ [2020-10-24 18:19:31] vanherkmarcel at gmail dot com Description: ------------ I am attempting to send binary data to a process openened with popen under windows. However, any 0x0a is appended with a 0x0d, and there is no option to turn this of: popen($exe, 'wb') fails. Test script: --------------- $handle = popen($exe, 'w'); fwrite($handle, file_get_contents($_FILES['filetoupload']['tmp_name'])); pclose($handle) Expected result: ---------------- Data is transmitted as is without interference Actual result: -------------- 0x0a replaced by 0x0a 0x0d ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80282&edit=1

« previous php.bugs (#229929) next »