PHP Not loading php.ini file?

I'm running PHP 5.1.0 under Apache on a Linux box.  When I run phpinfo(), it tells me that the location of my php.ini file is at "/export/software/minerva/php/lib".  Originally, there was no file there, so I put a copy of the distribution one there and restarted apache.  This had no effect.  None of the configuration changes that I make to this php.ini file are ever reflected when I phpinfo().  I've subsequently tried placing copies of my modified php.ini file in the local directory that I execute phpinfo() out of, in the root directory of php, and in the root directory of apache and htdocs--still, nothing happens.  PHP seems unwilling to load the php.ini file.

One note that might be related is that whenever I restart apahce, I get the following error:

[warn] module mod_php5.c is already added, skipping

All I can think of to try at this point is to completely unistall and reinstall everything, which I'm not anxious to do as this is a production server.  I'm hoping someone will have seen this before and might be able to help.
wizcarlAsked:
Who is Participating?
 
spotxCommented:
As far as the php.ini issue you will need to check out the build process
I would try and run ./configure with the parameters that were set in the the original and change the php.ini location to a simpler one ie: /etc/php.ini
phpinfo() should give you an idea of what the configure parameters were.
just re-running ./configure may help if it throws any errors
This looks like it will require a methodical approach to step by step find whats wrong

did you try
su apache -c '/bin/cat /export/software/minerva/php/lib/php.ini'


 
0
 
spotxCommented:
Haven't done a compile of PHP for quite a while however the location of where the php.ini is kept is one of the options in the ./configure script
check out the config file in that directory or do a ./configure --help in the build directory
or you could try the old standard places like /etc/php.ini or maybe /usr/local/etc/php.ini
Some distros do some wierd stuff and stick some things in weird places you could do a
locate php.ini and see what you find
or maybe there is something /usr/share/docs

0
 
wizcarlAuthor Commented:
This isn't the problem. As I've already stated, the php configuration says that it is looking in "/export/software/minerva/php/lib" for the php.ini file, but it doesn't process the file here, or anywhere else.  Its my understanding that PHP shoul load the file at the configured location as the default, but should also load a local php.ini file in any script directory as a local override.  In my case, it won't load a php.ini file from anyewhere, even the directory that it is configured to look in.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
spotxCommented:
That may be true but these things may not be enabled in the configuration.

Also can apache get to this directory and read it.
Also apache may be blocking reading the local php.ini file maybe AllowOverride in the httpd.conf or where ever you distro does it

Did you complie it or is it a distro version if so which distro and where are the docs for php
0
 
wizcarlAuthor Commented:
AllowOverride is enabled and and Apache can read the php.ini directory and read it.  PHP was compiled on the server, although I didn't do it.
0
 
spotxCommented:
[warn] module mod_php5.c is already added, skipping
Also this warning is basically Apache saying that it's module loading procedure is called twice on the same file
This should not create the php.ini issues you speek of
you will need to work out how the modules are loaded in your vaersion of apache
maybe
grep -r mod_php5 /etc/httpd/*
find where it is added twice

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.