You are here:Home»KB»Programming»PHP»GrabPHP - Dump the system php.ini
Sunday, 22 February 2015 21:21

GrabPHP - Dump the system php.ini

Written by

To do a lot of php.ini overides you need to get the system php.ini before you can start but this can be a tricky thing. This script will read and then dump the system php.ini

  1. Alter the code below to fit your server and then create grab.php with the altered code and upload to your website public directory.

    <?
    copy('/usr/local/lib/php.ini', '/home/example/public_html/php.ini');
    ?>
    If you do not know your physical paths you can create a file called info.phpwith the following code, upload it to your root public folder and run it. The script will display all of the required information including the physical path.
    <? phpinfo() ?>
  2. Upload grab.php to your root public folder
  3. Browse to the file and run it. Assuming you loaded it to your root public_html folder then you should browse to
    http://www.example.com/grab.php
  4. This file will create a copy of your system php.ini file and dump it into your root public folder.
  5. Download the new php.ini to your PC
  6. Delete the php.ini and grab.php from your webserver

 

Read 997 times Last modified on Sunday, 22 February 2015 21:40