php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37887 My php.ini is not read
Submitted: 2006-06-22 13:20 UTC Modified: 2006-06-22 18:54 UTC
From: petrkuzel at eurofins dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.1.4 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: petrkuzel at eurofins dot com
New email:
PHP Version: OS:

 

 [2006-06-22 13:20 UTC] petrkuzel at eurofins dot com
Description:
------------
I want to use mssql extension but I'm not able to make PHP use my php.ini file that contains declaration.

5.1.4 is manually installed on Windows with IIS 5.1. 







Reproduce code:
---------------
<?php

  echo "INI = " . get_cfg_var("cfg_file_path") . "<br>"; 

  echo "Prepend = " . ini_get("auto_prepend_file") . "<br>";

  phpinfo();


  
?>

Expected result:
----------------
Instead of expected:

  INI = c:\app\php\
  Prepent = c:\app\php\marker.txt

Actual result:
--------------
Returns:

  INI = 
  Prepend = 
  <the info tables> reporting ini path as "c:\windows" (I put there one with 'auto_prepend_file marker' but it's not picked up), extension_dir as "c:\php5", consequently no extensions discovered.... 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-22 14:07 UTC] petrkuzel at eurofins dot com
I tried to set HKEY_LOCAL_MACHINE/SOFTWARE/PHP/IniFilePath in registry, but it's also ignored (based on missing the header mark and phpinfo() output). Still empty result. It's after IIS restart (from IIS console).
 [2006-06-22 14:29 UTC] petrkuzel at eurofins dot com
OK it looks like PHP is written in restart whole OS style. After restarting OS php.ini from C:\windows was picked. I do not undertand why (there is one in php dir and one pointed by Windows registry key) but at least I know where to put my php.ini. In spite of fact I hate it, I can use system global.

Now I can get to point, Mantisbt.org.
 [2006-06-22 14:35 UTC] petrkuzel at eurofins dot com
My partial conclusion. 

If phpinfo() states as used php.ini "c:\windows" it in fact does NOT use any php.ini. 

When is uses php.ini from C:\windows it is reported as "c:\windows\php.ini"


It would be nice if phpinfo() returned what locations were probed for the php.ini.
 [2006-06-22 14:54 UTC] petrkuzel at eurofins dot com
Registry HKEY_LOCAL_MACHINE/SOFTWARE/PHP/IniFilePath works if it points to folder (vs file as suggested by the name :-(). Again restart.

The remaining issue (for me) is what is SAPI default location and web server location in case of IIS.
 [2006-06-22 18:54 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Put your php.ini to c:\windows and restart web-server.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC