rosland
December 16 '03, 05:04 AM
I recently installed PHP version 5.0 BETA2, to test it out.
I was surprised when non of the mysql functions worked. That is, they all generated an error message saying "call to undefined function".
It turned out the mysql-library wasn't integrated, even though it was supposed to be.
(By uncommenting the php_mysql.dll, everything worked as normal. Guess this will be fixed before final release.)
The way I found out the whole functionlist was missing, was by running the below provided script. The script uses two functions you might find useful.
The first get_loaded_extensions(), returns an array of all the extension sets currently available in your PHP installation.
The second get_extension_funcs(), takes an extension set as its argument and returns an array containing all legal functions in that particular extension set.
The well known phpinfo() call, lists your PHP and Zend version, a list of settings in your php.ini file, plus an abbreviated list of installed extensions.
The above mentioned functions however, give you complete list of installed and available libraries, with all associated functions listed. This is quite nice as a reference list as well, if you forget how a particular function is written.
The script:
<?php
echo "<i>Functions and extensions supported in this install: </i><br /><hr />";
//loads the extensions array
$extensions=get_loaded_extensions();
//loops through all extensions in the array by a "key => value" call
foreach($extensions as $ext)
{
echo "<h3>$ext</h3> <br />";
echo "<ul />";
//loads all subfunctions into an array
$functions=get_extension_funcs($ext);
foreach($functions as $func)
{
echo "<li>$func</li>";
}
echo "</ul><hr>";
}
?>
Hopefully some of you might find this useful.
I was surprised when non of the mysql functions worked. That is, they all generated an error message saying "call to undefined function".
It turned out the mysql-library wasn't integrated, even though it was supposed to be.
(By uncommenting the php_mysql.dll, everything worked as normal. Guess this will be fixed before final release.)
The way I found out the whole functionlist was missing, was by running the below provided script. The script uses two functions you might find useful.
The first get_loaded_extensions(), returns an array of all the extension sets currently available in your PHP installation.
The second get_extension_funcs(), takes an extension set as its argument and returns an array containing all legal functions in that particular extension set.
The well known phpinfo() call, lists your PHP and Zend version, a list of settings in your php.ini file, plus an abbreviated list of installed extensions.
The above mentioned functions however, give you complete list of installed and available libraries, with all associated functions listed. This is quite nice as a reference list as well, if you forget how a particular function is written.
The script:
<?php
echo "<i>Functions and extensions supported in this install: </i><br /><hr />";
//loads the extensions array
$extensions=get_loaded_extensions();
//loops through all extensions in the array by a "key => value" call
foreach($extensions as $ext)
{
echo "<h3>$ext</h3> <br />";
echo "<ul />";
//loads all subfunctions into an array
$functions=get_extension_funcs($ext);
foreach($functions as $func)
{
echo "<li>$func</li>";
}
echo "</ul><hr>";
}
?>
Hopefully some of you might find this useful.