php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80937 Bug on PHP: PHP.INI not loading on windows 10
Submitted: 2021-04-05 15:13 UTC Modified: 2021-04-05 16:00 UTC
From: gilperon at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: *General Issues
PHP Version: 8.0.3 OS: WINDOWS 10 + PHP 8
Private report: No CVE-ID: None
 [2021-04-05 15:13 UTC] gilperon at gmail dot com
Description:
------------
I installed PHP 8 from https://windows.php.net/download/ (VS16 x64 Thread Safe) and also Apache (VS16 64 bits). I changed httpd.conf and added the lines below at the bottom of it:

LoadFile "Z:/servidor/PHP/php8ts.dll"
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .html .html
LoadModule php_module "Z:/servidor/PHP/php8apache2_4.dll"
<IfModule php8_module>
PHPIniDir "Z:/servidor/PHP"
</IfModule>

I renamed php-development.ini to php.ini so I can customize it later.

Then I started Apache. PHP works fine BUT php.ini file is never loaded. No matter what I try to do, php.ini is always not loaded.

phpinfo() shows:

    Configuration File (php.ini) Path	no value
    Loaded Configuration File	(none)
    Scan this dir for additional .ini files	(none)
    Additional .ini files parsed	(none)

Also `php_ini_loaded_file()` returns false.

I work with PHP for over a decade and I already installed it at least a hundred times and a few times I had problems making PHP work, and this time it's happening again. Is it a bug on Windows?

Expected result:
----------------
Php.ini file should be loaded

Actual result:
--------------
Php.ini file is not being loaded.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-05 15:19 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-04-05 15:19 UTC] cmb@php.net
> LoadModule php_module "Z:/servidor/PHP/php8apache2_4.dll"
> <IfModule php8_module>
> PHPIniDir "Z:/servidor/PHP"
> </IfModule>

It's either php_module or php8_module, not both.
 [2021-04-05 15:57 UTC] gilperon at gmail dot com
cmb@php.net

Thanks, it worked! But it's not "either", it's "php_module". If I use "php8_module" on both lines, it does not work. It has to be "php_module" on both lines.
 [2021-04-05 15:57 UTC] gilperon at gmail dot com
I dont know how to close, could you cmb@php.net please close this?
 [2021-04-05 16:00 UTC] cmb@php.net
This ticket is already closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC