Page 1 of 1

php information check

Posted: Thu Aug 10, 2006 1:40 pm
by SidewinderX
ok so ive built a program and now i want to make an install script that the user can just execute and it checks a few things, creates the database tables, configures the config.php and maybe a few other things.

but first how would i have the script check the version of php the server is running, if openssl is installed, and if it has zend optomiser?

my origional thought would be to parse the phpinfo() but i was wondering if there was any other way?

Posted: Thu Aug 10, 2006 1:48 pm
by Luke

Posted: Thu Aug 10, 2006 2:34 pm
by SidewinderX
perfect

so i built this script to check if the Zend Optomiser is installed

Code: Select all

<?php
$loaded_extensions = get_loaded_extensions();
$key = array_search('Zend Optimizer', $loaded_extensions);
if($key == "") {
echo "The key does not exist.";
} else {
echo "The key exists.";
}
?>
now i need to check if https is a registered stream, i found the perfect function: stream_get_wrappers() but thats for PHP5, i was wondering if there was a PHP4.x equivilant