Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98927 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20758 invoked from network); 2 May 2017 09:01:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 May 2017 09:01:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=themattficken@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=themattficken@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.52 as permitted sender) X-PHP-List-Original-Sender: themattficken@gmail.com X-Host-Fingerprint: 74.125.83.52 mail-pg0-f52.google.com Received: from [74.125.83.52] ([74.125.83.52:36052] helo=mail-pg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/12-02776-AFA48095 for ; Tue, 02 May 2017 05:01:47 -0400 Received: by mail-pg0-f52.google.com with SMTP id t7so57840278pgt.3 for ; Tue, 02 May 2017 02:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=VlvhMs1uneAv6FfhfAS4yHqyh2RiqBpDrfn/pm9h3Fg=; b=sojaDPQQVg0La8/iyEH0ck36ZbTZaPDi3VzOd2i9IUvL9oPCyn9Ax1PWG/C8Rt1Pw4 sEioLOKobnf93dNw4O0rjQBAweikf0JDxB9K5YNdLfjk1J7JoTZdQ3K8S2v+2bI55rta 7XwoIxuAyarrz8kTOZkceO/XHcbREK31k+ZDBH6ap0gD/vQ11PYUbWcrsiNRYh5pln0D SKmAmc8/pBvzFWv1ZO2fblQM7BLX4KUrTEHWwm8VI7D4wp/SuiS9eEHsibY22hahfUjL KCJKsyXN5L6OqLE60OKFQKO18S1ZdpWURNoBiXnaJF9gaaRm4jgnt69jDQB39lhuTMLW x7FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VlvhMs1uneAv6FfhfAS4yHqyh2RiqBpDrfn/pm9h3Fg=; b=PAPy3Fsd8lUNc3/9gN8iYLntuz/LJUjKCYaKpftluAVNWsH05h4DQMihhFoL32UC+a NmFUbqYyOSPgAPkofJYcFkEkncABtHVf9+EnF69OjwGagUtDN9mnwZNnpBR3CS7QgyHg cnsWDK/Ax14N+gW0lUUInBUNtZoul8tsJDQlMyIon1fHzM5+JtAmQcljjea87LerJkyD axwlb05k0093x56PsTUNb013OGMWjmfSilnUoTBwZRvNik2yqR5bja8evhn7DvxIjSmO x5bUEcClYNHVATBw/ScGrT+wgjNp8DkUyF3stYBjg347R/FG5aHSm0DUe3V0MfE8gMsf fjAQ== X-Gm-Message-State: AN3rC/5jP6foi5wsc3ci3+K1Hh7O3EUH1z/t0M40jKJEDK2LHR0+Q6Wh k3g3IOmPHVMW17UuLQ5dVTp399BNmYnhwik= X-Received: by 10.98.80.156 with SMTP id g28mr30404637pfj.163.1493715702775; Tue, 02 May 2017 02:01:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.189.3 with HTTP; Tue, 2 May 2017 02:01:42 -0700 (PDT) Date: Tue, 2 May 2017 02:01:42 -0700 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001a11461ea8dc043c054e86c97c Subject: variables_order issue with run-test.php From: themattficken@gmail.com (Matt Ficken) --001a11461ea8dc043c054e86c97c Content-Type: text/plain; charset=UTF-8 Hi, I noticed that php.ini-development now sets variables_order="GPCS" instead of "EGPCS". run-test.php uses $_ENV to read environment variables and will set those on all the child processes it creates. However, if variables_order="GPCS", $_ENV will be empty and the environment variables table on the child process will be empty, at least on Windows, the only env variables the child then gets are PATH and COMSPEC. Importantly, TEMP or TMP is not available, which causes a problem for generating temporary file names, and on Windows, that breaks OpCache. Often, php.ini-development will just be renamed to php.ini. Since $_ENV isn't preferred anymore, run-test.php shouldn't be dependent on it. I can fix this myself, but would like to know the preferred solution. I suggest any of these fixes: 1. die if variables_order doesn't include "E" 2. die if $_ENV is empty: lots of tests will be false fails if no env vars are set, so prevent getting to that point. 3. use getenv() to read common environment variables(TEMP or TMP) at least. getenv() doesn't provide a list of environment variable names, and ideally it would just copy all of them, so try to use $_ENV and only use getenv() if TEMP or TMP is not set. and then die if $_ENV is still empty. Regards -M --001a11461ea8dc043c054e86c97c--