php information check

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SidewinderX
Forum Contributor
Posts: 407
Joined: Fri Jul 16, 2004 9:04 pm
Location: NY

php information check

Post 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?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

SidewinderX
Forum Contributor
Posts: 407
Joined: Fri Jul 16, 2004 9:04 pm
Location: NY

Post 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
Post Reply