|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-10-02 08:00 UTC] eru@php.net
Description:
------------
Apparently this has something to do with the environment-variables in the shell, popen uses to execute the command. If I replace "echo FOO" with "export" I get the whole line of variables and then it fails, whereas the successful execution only has one, BASH=/bin/sh. I use php -n so no php.ini is used.
Reproduce code:
---------------
<?php
$pp = popen("echo FOO", "r");
echo fread($pp, 4096);
var_dump(pclose($pp));
?>
Expected result:
----------------
FOO
int(0)
Actual result:
--------------
FOO
int(-1)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 23:00:01 2025 UTC |
./configure \ --enable-bcmath \ --enable-calendar \ --enable-debug \ --enable-exif \ --enable-ftp \ --enable-mbstring \ --enable-memory-limit \ --enable-pcntl \ --enable-shmop \ --enable-sigchild \ --enable-ucd-snmp-hack \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --with-apxs=/usr/local/apache/bin/apxs \ --with-bz2 \ --with-gd \ --with-freetype-dir \ --with-gettext \ --with-ldap \ --with-mysql=/usr \ --with-mysql-sock=/var/lib/mysql/ \ --with-ncurses \ --with-snmp \ --with-xml \ --with-zlib