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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.