Jump to content

[SOLVED] Php Not reading Php.ini


Recommended Posts

I have enabled mysqli changed functions to fit my servers/applications needs.

 

Well.. Lets start from the beginning..

 

I edited my php.ini for my needs.

Saved it.

Restarted Apache.

Then I noticed Errors starting showing up.. On pages that I knew they had errors but I was not going to use them ever again.

Such as my custom home page I use on all my computers.

I have a lot of links and stuff on it. and I moved some files so some of the includes are not were they are anymore. and It's popping up errors.

Then I notice that on another page it's giving me a fatal error about mysqli function saying it's unknown.

 

So I of course am like What?!

Quickly put up a page with phpinfo();

 

Look over the page a few times and notice mysqli isn't there...

 

Very confused. I remotely pop onto my server (vnc).

Look through php.ini

Error display is off.

I was confused.

Look down for my extension=php_mysqli.dll

It's there.

 

I look over at phpinfo();

It says this:

Configuration File (php.ini) Path: C:\WINDOWS

Loaded Configuration File: C:\PHP\php.ini

 

Which is the right 'Loaded' file.. Wrong path.

 

I checked the system path.. It's C:\PHP\  :-\

I have searched the computer (using search)

For

Php

and

Php.ini

 

There is only ONE

php.ini On my entire server.

 

I have libmysql.dll all over the computer.

I have pretty much every extension module I could get my hands on in my ext (not all active).

 

I renamed php.ini to php.ini.bad

 

Phpinfo(); Gave me this:

Configuration File (php.ini) Path: C:\WINDOWS

Loaded Configuration File: (none)

 

 

So phpinfo(); Is making it seem like it's reading the file.

But when I turn on asp tags or php short tags

phpinfo will show it still off.

 

So It's not loading it. OR It's finding it. reading part of it? No clue what would cause this.

 

Any clues?

 

 

Link to comment
Share on other sites

I look over at phpinfo();

It says this:

Configuration File (php.ini) Path: C:\WINDOWS

Loaded Configuration File: C:\PHP\php.ini

 

Which is the right 'Loaded' file.. Wrong path.

Not sure what you mean by Wrong path, You should ignore the Configuration File (php.ini) Path line. Its the line below that should be correct - It must state the full path to the php.ini you're modifying. There should only be one instance of php.ini on your file system. Which should be the one in C:/php (this is php.ini PHP is reading for configuration).

 

I have libmysql.dll all over the computer.

 

There should only be at least two instances of libmysql.dll, one should be in MySQL's bin/ folder. The other in the root of your PHP installation folder (C:/PHP) You should delete/rename any other instances.

 

I have pretty much every extension module I could get my hands on in my ext (not all active).

Ensure the extensions you have available is of the same build as the version of PHP you have installed. If the versions do not match up they will not work, for example PHP5.2.5 extensions are not compatible with PHP5.2.6 extensions

Link to comment
Share on other sites

Oh? Ok well that makes me feel better about the path part.

 

Alright. Will do. Yes They are.

 

 

I uninstalled Php. and Reinstalled it.

Still it doesn't work.

Php runs fine. It just doesn't seem to be reading the file even though phpinfo says it is.

Link to comment
Share on other sites

OK I do have .htaccess files. But they do not override anything to do with php. just deny some access.

 

and..

 

The Local and Master values are showing exactly. The same.  :-\

 

and..

Are both NOT what I have set it to.

 

Yes I am restarting Apache on each test.

Link to comment
Share on other sites

I didn't get any errors that was the weird thing.

 

I wanted to try another thing.

 

I'm not sure what was wrong with it..

But

I DELETED php.ini clicked Change on the php installer.

So it would recreate the php.ini, it worked.

I'm fine now for some reason.

I don't see anything different.

Except for some of the custom changes. (not using SID cookies and so fourth)

 

It seems to be all up and running again.

I am making a copy of the php.ini name it php.ini-backup just in case.

 

Thank you for all the help.

I know a little more knowledge from all these checks.  :)

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.