Go Back   Cloud Computing > Support > PHP Forum
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-11, 06:37
BOD Member
 
Join Date: Nov 2010
Posts: 202
Default PHP Configration

Hi,

How can I find my PHP configuration (php.ini) file? The exact location of the file.
Reply With Quote
  #2 (permalink)  
Old 05-19-11, 06:40
BOD Member
 
Join Date: Dec 2010
Posts: 227
Default

Hi,

In Linux servers you a can find them directly by running command :

Quote:
php -i | grep php.ini
In windows PHP configuration file can be present in many places. If the 'php' (or 'php.exe' in Windows) binary is not in your PATH, you will have to navigate to the directory where it resides.
Reply With Quote
  #3 (permalink)  
Old 05-19-11, 06:45
Moderator
 
Join Date: Nov 2010
Posts: 476
Default

Hi,

You can run the PHP binary with the '-i' argument and extract the php.ini location using 'grep' (or 'find' in Windows).

Quote:
cd C:\PHP
php.exe -i | find php.ini
The commands above will show the location of the PHP configuration file that PHP installation is currently using on server.
Reply With Quote
  #4 (permalink)  
Old 12-02-11, 12:36
BOD Member
 
Join Date: Dec 2011
Posts: 16
Default PHP ini location

hi

In windows php.ini file is located in c:/xampp/php/php.ini.

Hope that helps
Thanks
CoreIT developers
Reply With Quote
  #5 (permalink)  
Old 12-03-11, 09:53
BOD Member
 
Join Date: Dec 2011
Posts: 2
Default Php ini file path

The path where PHP looks for its php.ini file is built into PHP on compile time. To find out that path, use a PHP script that does a phpinfo() call. This will display a e table of all of PHP's configuration variables. The path to php.ini can be found in the first part of that table, near the start of the page.

Geeklog ships with a phpinfo script in /path/to/geeklog/admin/install/info.php. Or you can simply create a new file (name it "phpinfo.php", for example) that contains the single line

<?php phpinfo(); ?>

Upload that file anywhere on your website and call it up in your browser.

Harish Rawat
CoreItDevelopers
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 01:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.