Jump to content

php.ini file being ignored


Recommended Posts

Hi,

 

I'm having an issue with the php.ini file that is driving me insane, I have installed Apache 2.0.59, MySQL and PHP 5 on Windows XP and all appears to be running OK, however any changes that I make to the php.ini file are ignored.

 

If I run the PHP Config Script it shows the Configuration File as C:\Windows which I realise means its loading the default settings and can't find php.ini

 

My php is installed in C:\php and the php.init file is in C:\Windows, I've added ;C:\php to the Path and have added the following to Apache:

 

LoadModule php5_module "c:/php/php5apache2.dll"

AddType application/x-httpd-php .php

#Configure the path tp php.ini

PHPIniDir "./"

 

I have also added the following to php.ini

 

extension_dir = "C:\php\ext"

 

And yes, I have re-started the Apache Web Server after every change I have made.

 

I have trawled Google for the last 2 nights and this seems to be quite a common problem, but there seem to be no easy fixes that I can find.

 

My sanity is in your hands and any help would be much appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/65531-phpini-file-being-ignored/
Share on other sites

You have added this line to the httpd.conf:

PHPIniDir "./"

 

the ./ means from the current working directory (where the httpd.conf file is being read). Change phpinidir to:

PHPIniDir "C:/php"

 

Move php.ini to C:/php. Save httpd.conf and restart Apache.

 

DO not move files around the filesystem. Moving files around can cause more problems.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.