php.ini file

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php.ini file

Postby asphp » 25. November 2008 19:40

Hi everybody
I've installed xampp on my Vista and I'm using it very comfortably and I impressed by its smooth functionality. I got a problem though with php.ini file: I have to make changes to this file but I can not find it. I Googled and I found out that the one in xampp/apache/bin should be the active one. But it was not. I ran phpinfo(), looked at the "Loaded Configuration File", which was "C:/Windows/php.ini" but it was not the file either. To find out that which one is the original file working on my machine, I searched for php.ini files and then I renamed them one by one. Nothing happened! I renamed them all but phpinfo() still working on localhost! I removed all php.ini files from my machine but it still working!
I need your help guys. Can anybody tell me why this is happening and where can I find the php.ini active file and make changes to it?
thank you in advance.

asphp guy
asphp
 
Posts: 4
Joined: 25. November 2008 19:24

Re: php.ini file

Postby Dave_L » 25. November 2008 19:47

asphp wrote:I ran phpinfo(), looked at the "Loaded Configuration File", which was "C:/Windows/php.ini" but it was not the file either.


How did you determine that was not the file? What changes did you make to the file? Did you restart Apache after changing the file?
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Re: php.ini file

Postby asphp » 25. November 2008 19:56

Dave_L wrote:How did you determine that was not the file? What changes did you make to the file? Did you restart Apache after changing the file?


Hi Dave:
Initially, I didn't see the changes that I made to the php.ini file and then, as I said, I renamed the file(s) and eventually removed it all completely from my machine, but it's still showing in phpinfo()! I have no php.ini file in my C:/Windows/ directory any more.

asphp
asphp
 
Posts: 4
Joined: 25. November 2008 19:24

Postby Sharley » 25. November 2008 21:16

In XAMPP the php.ini file used is in the .\xampp\apache\bin folder and any changes you make should be made in this file only then save the file and restart Apache.

In the phpinfo() file you should see these 2 entries which is quite normal.
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\xampp\apache\bin\php.ini

Loaded Configuration File is the file used and you may ignore the C:\Windows entry.

If you have a php.ini file in the Windows folder this usually means another php instance has/is installed on your PC.

Renaming this Windows php.ini file is all that maybe required but will not change the first entry above regarding the C:\Windows php.ini file.

After making any edits in the php.ini file in the apache\bin folder and after saving the file and restarting Apache then again check the phpinfo() file to see if your edits have been reflected.


For an effective troubleshoot you may wish to post exactly what you are trying to change in the php.ini file and how you're trying to make this change.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby asphp » 25. November 2008 22:54

Sharely, thank you for your detailed comments. I believe that one image works better than thousands words. Please look at the image I'm going to link to this message. There is no php.ini file on my ./xampp/apache/bin directory and phpinfo() is still working perfectly on the background as you can see. I've restarted Apache server trhough xampp's console a few times.
Screenshot
asphp
 
Posts: 4
Joined: 25. November 2008 19:24

Postby Sharley » 26. November 2008 02:31

If your original XAMPP installation was successful then the php.ini file would have been located in the apache\bin folder.

Make sure you don't have another instance of php installed on your PC that may be interfering with the XAMPP instance which has often happened in the past by other members - Eclipse etc. and other such php programs often have their own inbuilt php and who often place a php.ini file in the Windows folder.

To recover your XAMPP installation it may be better to install again, a fresh installation has been known to have solved these unusual issues - XAMPP is designed to 'work out of the box' with no user tweaking necessary.


Stop all XAMPP components and uninstall any you have running as a service including the XAMPP Control Panel - check using the Windows Task Manager that there are no apache and/or mysql files still running in the Processes tab.


Then delete the xampp folder - this is a recommended uninstall procedure so a clean fresh install can be performed, never try and install over the top of an existing xampp folder.

If necessary download a fresh copy of XAMPP from the Apache Friends web site, preferably the latest 1.6.8 version - and my personal choice is the 7zip installation process or the zip archive method as I can see what files exist before I install XAMPP, also I am still on XP and have not downgraded Vista.

Now install again and check before doing anything after the install that the php.ini file is in the apache\bin folder.

Then go to the XAMPP Welcome page http://localhost and see how it looks now.

BTW your image is very big width wise which is causing this thread to horizontal scroll unnecessarily and is a real pain if this thread gets much bigger, which makes it very hard to read - is it possible to reduce the dimensions to fit the forum thread width please?

Thanks.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby asphp » 29. November 2008 02:51

Sharley:
I will do what you've suggested above and will let you know. BTW, sorry about the image size. I will keep your comment in mind if I have to do it again. Thanks for your help.
asphp
 
Posts: 4
Joined: 25. November 2008 19:24


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 221 guests