|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-05-12 08:32 UTC] jo at feuersee dot de
I tried to print out all available PHP functions using
get_loaded_extensions() and get_extension_funcs():
<?php
print("<h3>PHP" . phpversion() . "</h3>\n");
print("<ol>\n");
$ext = get_loaded_extensions();
sort($ext);
for($i = 0; $i < count($ext); $i++) {
$name = $ext[$i];
print("<li><b>$name</b>:</li>\n<ol>\n");
$func = get_extension_funcs($name);
sort($func);
for($j = 0; $j < count($func); $j++) {
print("<li><code>$func[$j]()</code></li>\n");
}
print("</ol>\n");
}
print("</ol>\n");
?>
and this worked well with PHP4.0.3pl1.
However, since PHP4.0.4pl1/5, the Apache (1.3.19)
subprocess dies:
[Sat May 12 14:26:49 2001] [notice] child pid 746 exit
signal Segmentation fault (11)
When commenting out the get_extension_funcs() call, all is
well. Even replacing the argument to a const (eg.
get_extension_funcs("exif") ) works.
I tried to reproduce the error in a more simple way, but
failed:
<?php
$name = "exif";
print_r(get_extension_funcs($name));
?>
works as expected. Still the script above fails.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Ok, I spend a sunday with wounderful weather about this and finally isolated the bug: get_loaded_extensions() returns an extension called "Session MM" when available. Feeding this string to get_extension_funcs() kills the process. So the simpliest way to reprodruce the bug is: <?php $foo = get_extension_funcs("Session MM"); ?> Most probably this works only when the extension is available, that would explain why some people had no problem running the example. HTH, Jo