php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19647 PHPRC does not work in WindowsXP
Submitted: 2002-09-28 05:56 UTC Modified: 2002-10-20 23:25 UTC
Votes:7
Avg. Score:3.7 ± 1.0
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:3 (60.0%)
From: dsmidgy at yahoo dot com Assigned:
Status: No Feedback Package: *Configuration Issues
PHP Version: 4.2.3 OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-09-28 05:56 UTC] dsmidgy at yahoo dot com
When I set enviroment variable PHPRC=d:\php and put php.ini into this directory the php.exe acted as there is no php.ini file (I guess php.exe does not look into PHPRC). I tryed to set PHPRC=d:\php\ and PHPRC=d:\php\php.ini. It only works when php.ini is in %systemroot%.
SET command Command promt lists this: PHPRC=d:\php
so I know (I think) I set it right. Is there any solution?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-05 01:59 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

On windows PHP 1st checks the current directory for existance of php.ini file. If the file is not found, it checks inside the %systemroot% directory. If the file is still not found that built-in defaults are assumed.
 [2002-10-05 05:36 UTC] mfischer@php.net
Re-Opening.

PHP does check for PHPRC in main/php_ini.c in php_init_config() and places it in the php_ini_search_path after the path of the executeable and before the systemroot path.

Please run the binary from http://guru.josefine.at/tmp/test.zip (make sure the exe and dll are in the same path, the zip has no subdirs) with tests something like that:

X:\apache\htdocs\bugs>c:\php\cvsdebug\php -v
*** debug: env_location[0] = ' '
*** debug: php.ini search path is 'c:\php\cvsdebug\'
*** debug: php.ini search path is 'c:\php\cvsdebug\'
*** debug: php.ini search path is 'c:\php\cvsdebug\;C:\WINNT'
PHP 4.3.0-dev (cli), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies

X:\apache\htdocs\bugs>set PHPRC=c:\testest

X:\apache\htdocs\bugs>c:\php\cvsdebug\php -v
*** debug: env_location = 'c:\testest'
*** debug: env_location[0] = 'c'
*** debug: php.ini search path is 'c:\php\cvsdebug\'
*** debug: php.ini search path is 'c:\php\cvsdebug\;c:\testest'
*** debug: php.ini search path is 'c:\php\cvsdebug\;c:\testest;C:\WINNT'
PHP 4.3.0-dev (cli), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies

If I place a php.ini in c:\testest then it's also shown in the phpinfo() output from "php.exe -i"

Maybe this is related to environment you're running PHP under.

Apache ? IIS ? CGI ? Module ?
 [2002-10-20 23:25 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, 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: Sat Apr 20 08:01:30 2024 UTC