Where to Find Php.ini?

Discussion in 'PHP' started by bigmodo, Feb 24, 2010.

  1. #1
    where can i find php.ini in my cpanel?
     
    bigmodo, Feb 24, 2010 IP
  2. fri3ndly

    fri3ndly Active Member

    Messages:
    111
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You need to have root access to your server to be able to edit this file, which usually means it needs to be dedicated or a VPS.

    If you are on a shared server you will not be able to find or edit it.
     
    fri3ndly, Feb 24, 2010 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Normally it is under

    /usr/local/lib/php.ini

    SSH to your server and run: locate php.ini

    For most purposes you want to make changes in a .htaccess file. This way a site specific change doesn't affect the whole server. If you do need to change something globally in php, edit it in the file.
     
    jestep, Feb 24, 2010 IP
  4. humgurung

    humgurung Active Member

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    Hi Bigmodo,

    Create a page name phpinfo.php and insert the below code into it. Open this page up in your browser.

    <?php
        // Show all information, defaults to INFO_ALL 
    
      phpinfo();
    
        // Show just the module information. 
    
        // phpinfo(8) yields identical results. 
    
        // phpinfo(INFO_MODULES);
    
    ?>
    
    PHP:
    Hum :)
    NepaliSongs.TV
     
    humgurung, Feb 24, 2010 IP
  5. Om ji Kesharwani

    Om ji Kesharwani Peon

    Messages:
    211
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Its not for all ....
    Only for Dedicated....
     
    Om ji Kesharwani, Feb 24, 2010 IP
  6. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #6
    use
    phpinfo(1);
    and search the page using find for php.ini
     
    JAY6390, Feb 24, 2010 IP