go to bug id or search bugs for
In PHP 5.3.1, a putenv() call with a one character value does not assign the value to the variable -- however it does create the variable.
It doesn't matter what type of character it is (alpha, numeric, or other).
A workaround is to add a space character before or after the value, e.g.:
(...as long as this space does not cause problems for the consumers of the variable as it will be part of the string value.)
We would expect the output to be:
which it does under PHP 5.3.0.
Add a Patch
Add a Pull Request
Please try using this snapshot:
It's either fixed or win32 only issue since I can't reproduce this under linux using latest SVN checkout.
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Bug still exhibited.
SVN revision 293853 Clean (checked out 2010-01-22 10:15 PST)
Compiled on Windows 2008 R2 / VC9 (VS 2010 Express)
Automatic comment from SVN on behalf of pajoye
Log: - #50690, putenv does assign value when their length is one char
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.