Bug #80674 [Fbk->Opn]: getenv("COMPUTERNAME") gets no result anymore
| From: | info at sperlingprog dot com | Date: | Thu, 28 Jan 2021 12:09:07 +0000 |
| Subject: | Bug #80674 [Fbk->Opn]: getenv("COMPUTERNAME") gets no result anymore | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231812@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80674&edit=1
ID: 80674
User updated by: info at sperlingprog dot com
Reported by: info at sperlingprog dot com
Summary: getenv("COMPUTERNAME") gets no result anymore
-Status: Feedback
+Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Windows 10 prof
PHP Version: 8.0.1
Block user comment: N
Private report: N
New Comment:
in phpinfo(); is no entry 'COMPUTERNAME' under Environment
var_dump(getenv("COMPUTERNAME")) => bool(false)
apache 2.4 php8 32 bit
ScriptAlias /php8 "C:/web/php8_32bit"
<Directory "C:/web/php8_32bit">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
<Directory "C:\web\Apache24\htdocs\burz_auftraege">
UnsetEnv PHPRC
<FilesMatch "\.php$">
SetHandler application/x-httpd-php8
Action application/x-httpd-php8 "/php8/php-cgi.exe"
</FilesMatch>
</Directory>
my PCNMAE is 'SPERLINGPROG'
__________________________________________________
with php7 ( same apache ) it works but over:
LoadModule php7_module "C:\web\php7_32bit\php7apache2_4.dll"
Previous Comments:
------------------------------------------------------------------------
[2021-01-28 11:01:28] cmb@php.net
Hmm, works for me with the CLI Sapi. Which SAPI/Webserver do you
use? Also make sure to check the output of
var_dump(getenv("COMPUTERNAME"))
Does you COMPUTERNAME contain non-ASCII characters?
------------------------------------------------------------------------
[2021-01-27 14:25:35] info at sperlingprog dot com
$PCNAME = strtoupper(getenv("COMPUTERNAME"));
getenv returns no result or returns a empty string
expected: the name of Windows PC (COMPUTERNAME)
the same line in php 7 works as expected
------------------------------------------------------------------------
[2021-01-27 07:38:46] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2021-01-27 07:22:14] info at sperlingprog dot com
Description:
------------
getenv("COMPUTERNAME") gets no result anymore
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80674&edit=1