php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52707 php.ini not being read
Submitted: 2010-08-26 14:39 UTC Modified: 2010-08-26 14:50 UTC
From: arijit dot sarbagna at gmail dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.2.14 OS: Win XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: arijit dot sarbagna at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-26 14:39 UTC] arijit dot sarbagna at gmail dot com
Description:
------------
Installed php-5.2.14-Win32.zip with Apache 2.2.16. Noticed that php.ini was not being read. Though running phpinfo() showed:
--------------------------------------------------------
Configuration File (php.ini) Path  C:\WINDOWS  
Loaded Configuration File  D:\Php\php.ini  
--------------------------------------------------------

Interestingly, even if I delete/rename the pointed php.ini, Apache still restarts fine without any error & my phpinfo shows:
--------------------------------------------------------
Configuration File (php.ini) Path  C:\WINDOWS  
Loaded Configuration File  
--------------------------------------------------------

Though, there is no php.ini at C:\Windows.

Even when I tried putting just one (& only one) php,ini at C:\Windows, it was still not reading the php.ini (e.g. my changes to add/remove any extension was not reflecting).

My Apache httpd.config reads like:
--------------------------------------------------------
LoadModule php5_module "D:/Php/php5apache2_2.dll"

<IfModule php5_module>
PHPIniDir "D:/Php/php.ini"
   <Location />
	AddType application/x-httpd-php .php
	AddType application/x-httpd-php-source .phps

	AddType text/html .php .phps
	AddHandler application/x-httpd-php .php
	AddHandler application/x-httpd-php-source .phps   
   </Location>

</IfModule>
--------------------------------------------------------

When I removed php-5.2.14 by freshly downloaded php-5.3.3-Win32-VC9-x86.zip content, it started to work per expectation i.e. php.ini was correctly evaluated/read.

Expected result:
----------------
php.ini should be evaluated/read

Actual result:
--------------
php.ini was not being evaluated/read

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-26 14:42 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2010-08-26 14:42 UTC] pajoye@php.net
c:\windows is the default. But as the 'loaded configuration' entry says, D:\Php\php.ini is loaded, which is what you expect.
 [2010-08-26 14:50 UTC] arijit dot sarbagna at gmail dot com
That is what my expectation was & I assumed it was reading the php.ini from D:\Php\php.ini. But as I stated, it wasn't reading it actually (that is why logged it here - not sure why it was behaving like this).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 11 07:01:30 2024 UTC