Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is php.ini ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 175
    Comment on it

    The php.ini file also known as (configuration file) is where we declare changes for Php settings. If you want to use the default settings then you can use existing php.ini file for the server else change settings by editing the existing php.ini file or you can create a new text file and save it as php.ini .

    NOTE: The configuration file (php.ini) is read when PHP starts up where else the server module versions of PHP, reads it only once when the web server is started.

    Location of the php.ini file: The php.ini file should exist in your cPanel Home Directory i.e (/home/username/).

    But if the does not exist in your account, then your site will use the default PHP settings as per defined on the server.

    How to create a new php.ini file in cPanel:

    1.Login to cPanel with valid credentials.

    2.Click on the File Manager icon,in the Files section.

    3.Select Home Directory and then click Go.

    4.Click the New File button option at the top of the page.

    5.In the field enter php.ini and click Create New File.

    6.Click the new file named php.ini.

    7.Select the Edit button at the top of the page and click the Edit button in the pop-up box.

    8.Input the contents of your new php.ini file and then click save.

    You can insert one of the following below mentioned code in your edited php.ini file:

    1.For displaying all PHP information:

    <?php phpinfo(); // This would be used
      to display all of the PHP information
      available for the installation ?>
    

    2.For displaying information related to installed modules:

      <?php phpinfo(INFO_MODULES); // This
      would be used to display the installed
      modules and their current values. ?>
    

    3.For displaying configuration of php.ini file:

    <?php phpinfo(INFO_CONFIGURATION); //
      This would be used to display the
      configurations you have setup through
      your php.ini or to review what's setup
      through the default configurations. ?>
    

    Type http://abc.com/phpinfo.php in the interner browser.

    Note: abc.com/ should be replaced with your actual domain.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: