note 127699 added to function.passthru
| From: | divinity76+spam at gmail dot com | Date: | Thu, 06 Oct 2022 16:32:22 +0000 |
| Subject: | note 127699 added to function.passthru | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219648@lists.php.net to get a copy of this message | ||
if you have problems with passthru("docker-compose ...bash") losing interactive shell size
information, try using proc_open instead, for some reason docker-compose bash knows the size of the
outer terminal when i use use proc_open, but loses that information when i use passthru,
eg i replaced
<?php
passthru("docker-compose -f docker-compose.yml bash",$ret);
?>
with
<?php
$empty1=array();
$empty2=array();
$proc=proc_open("docker-compose -f docker-compose.yml bash",$empty1,$empty2 );
$ret = proc_close($proc);
?>
and suddenly docker-compose bash knew my terminal size :)
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.161 (proxied: 2001:464b:47a3:0:d049:903d:6cf:4644)
----
Manual Page -- https://php.net/manual/en/function.passthru.php
Edit -- https://main.php.net/note/edit/127699
Del: integrated -- https://main.php.net/note/delete/127699/integrated
Del: useless -- https://main.php.net/note/delete/127699/useless
Del: bad code -- https://main.php.net/note/delete/127699/bad+code
Del: spam -- https://main.php.net/note/delete/127699/spam
Del: non-english -- https://main.php.net/note/delete/127699/non-english
Del: in docs -- https://main.php.net/note/delete/127699/in+docs
Del: other reasons-- https://main.php.net/note/delete/127699
Reject -- https://main.php.net/note/reject/127699
Search -- https://main.php.net/manage/user-notes.php