Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From the PHP Manual on <code>phpinfo()</code>:</p> <blockquote> <p>Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License. </p> </blockquote> <p><code>phpinfo()</code> does more than just printing out <code>php.ini</code> settings.</p> <p>If you want to process <code>php.ini</code> settings manually, you might want to check out <a href="http://www.php.net/manual/en/function.ini-get-all.php" rel="noreferrer"><code>ini_get_all()</code></a> instead of <code>phpinfo()</code>. This returns an array of all configuration values.</p> <p>You could transfer the output of <code>ini_get_all()</code> from server A to server B (for example by using <a href="http://www.php.net/manual/en/function.var-export.php" rel="noreferrer"><code>var_export()</code></a> to create PHP code to create the array, or <a href="http://www.php.net/manual/en/function.serialize.php" rel="noreferrer"><code>serialize()</code></a>), then use <a href="http://www.php.net/manual/en/function.array-diff-assoc.php" rel="noreferrer"><code>array_diff_assoc()</code></a> to compare the settings.</p> <hr> <p><strong>export.php</strong>: (Server A)</p> <pre><code>&lt;?php echo serialize(ini_get_all()); ?&gt; </code></pre> <p><strong>compare.php</strong>: (Server B)</p> <pre><code>&lt;?php function ini_flatten($config) { $flat = array(); foreach ($config as $key =&gt; $info) { $flat[$key] = $info['local_value']; } return $flat; } function ini_diff($config1, $config2) { return array_diff_assoc(ini_flatten($config1), ini_flatten($config2)); } $config1 = ini_get_all(); $export_script = 'http://server-a.example.com/export.php'; $config2 = unserialize(file_get_contents($export_script)); $diff = ini_diff($config1, $config2); ?&gt; &lt;pre&gt;&lt;?php print_r($diff) ?&gt;&lt;/pre&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload