Hello
how to check the php / mysql version on the server?
(plugin script)
i developer Plugin but i can't check phpinfo()
because script can't run ob_start() function
please help me
print_r($phpinfo);
result is
Array(
)
** if i can't modify directadmin.conf
show_php_version=0
thank you very much
how to check the php / mysql version on the server?
(plugin script)
i developer Plugin but i can't check phpinfo()
because script can't run ob_start() function
please help me
<?
ob_start();
phpinfo(-1);
$phpinfo = array('phpinfo' => array());
if(preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER))
foreach($matches as $match){
if(strlen($match[1]))
$phpinfo[$match[1]] = array();
elseif(isset($match[3]))
$phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
else
$phpinfo[end(array_keys($phpinfo))][] = $match[2];
}
?>
print_r($phpinfo);
result is
Array(
)
** if i can't modify directadmin.conf
show_php_version=0
thank you very much
Last edited: