php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35048 parse_ini_file() influenced by putenv() in special situation
Submitted: 2005-11-01 13:39 UTC Modified: 2005-11-11 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: liber at iproom dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5CVS-2005-11-01 (snap) OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: liber at iproom dot com
New email:
PHP Version: OS:

 

 [2005-11-01 13:39 UTC] liber at iproom dot com
Description:
------------
First, var_dump the result read by parse_ini_file is:
array (
  'dbHost' => 'localhost',
  'dbUser' => 'mmcwebapp',
  'dbPassword' => '',
  'dbName' => 'faraday',
)

but i don't know why, everytime after
the command: putenv("TZ=");

the result will change as follow:

array (
  'dbHost' => 'localhost',
  'dbUser' => 'mmcwebapp',
  'dbPassword' => '',
  'faradayc8XC9-2' => 'faraday',
)

I can't not figure out where problem is,
then I use Zend Studio and add a watch like this

var_export(parse_ini_file(DBX_CONFIG_FILE),1)

the DBX_CONFIG_FILE is defined as like as c:\a.ini

then I saw the changing in debug mode(step by step).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-01 14:27 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-11-01 17:27 UTC] liber at iproom dot com
I have try the latest PHP version (5.1.0 RC 5-dev)
The situation is the same.

Only if I disable the putenv command to stop put 'TZ' data,
then everything is normal.

When I re-enable to put 'TZ' by putenv, the error occur again.

And I forgot to say, additional, the apache2 will crash with this error sometimes.
 [2005-11-03 15:16 UTC] mike@php.net
What is your default TZ and what TZ are you trying to set?
 [2005-11-03 15:19 UTC] liber at iproom dot com
try to put "TZ="
 [2005-11-03 15:28 UTC] mike@php.net
If I could have reproduced I wouldn't have asked.
 [2005-11-11 01:00 UTC] php-bugs at lists dot php dot net
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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC