function GetFileList($dirname="."){
global $config;
$list = array();
if ($handle = opendir($dirname)) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/\.(jpeg|gif|png)$/i",$file)) {
$list[] = $file;
}
}
closedir($handle);
}
sort($list);
return $list;
}#-#GetFileList()
Any help would be GREATLY appreciated!Your code works nicely on my build of php (https://www.oesf.org/forums/index.php?showtopic=18616).
QuoteAny help would be GREATLY appreciated!Your code works nicely on my build of php (https://www.oesf.org/forums/index.php?showtopic=18616).
With regards to maxq's suggestion, if the pcre in official feed does not work for you, you could try the one in my feed (which is what I'm using because the official one does not support UTF which I need for Bluefish):
http://mail.pdaxrom.org/contrib/desertrat (http://mail.pdaxrom.org/contrib/desertrat)
-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=124109\"][{POST_SNAPBACK}][/a][/div]
require('lang/index.php');
$gd_version = gd_version();
echo ''.$GLOBALS['lang_GD_detect'] . $gd_version . "\n\n
";
if($gd_version != 0)
echo ''.$GLOBALS['lang_GD_copy'].'
$gd_version = "' . $gd_version . '";
';
else
echo "".$GLOBALS['lang_GD_none']."
";
function gd_version() {
static $gd_version_number = null;
if ($gd_version_number === null) {
ob_start();
phpinfo(8);
$module_info = ob_get_contents();
ob_end_clean();
if (preg_match("/\bgd\s+version\b[^\d\n\r]+?([\d\.]+)/i",
$module_info,$matches)) {
$gd_version_number = $matches[1];
} else {
$gd_version_number = 0;
}
}
return $gd_version_number;
}
?>
I just noticed on your original post in the other forums re LAMP that GD was included in the package, however I ran the following code to detect the GD Version and it returnedgd and various other extensions have been compiled as dynamically loadable modules. This is to reduce the number of "hard-coded" dependencies. Eg if mysql had been compiled statically into php as opposed to a separate dynamically loadable module then you would be forced to install MySQL whether you need it or not.
Detected GD Version: 0
GD was not detected on your server.
[...]
appreciate your feedback!
QuoteI just noticed on your original post in the other forums re LAMP that GD was included in the package, however I ran the following code to detect the GD Version and it returnedgd and various other extensions have been compiled as dynamically loadable modules. This is to reduce the number of "hard-coded" dependencies. Eg if mysql had been compiled statically into php as opposed to a separate dynamically loadable module then you would be forced to install MySQL whether you need it or not.
Detected GD Version: 0
GD was not detected on your server.
[...]
appreciate your feedback!
Now to answer your question, you can do one of the following:
- add dl('gd.so'); to your code
- edit /usr/local/apache/conf/php.ini and uncomment the line ;extension=gd.so, restart apache
-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=124732\"][{POST_SNAPBACK}][/a][/div]
However Have come across another brick wall I was hoping you could help me out on. PHPInfo shows that GD is installed with support for GIF and PNG, but no JPEG support.It needs to be recompiled. I'll see it I can find time to do it sometime this week.
I have revision 6b of libjpeg installed, but how to I enable GD to see/use it?
It needs to be recompiled. I'll see it I can find time to do it sometime this week.
-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=125249\"][{POST_SNAPBACK}][/a][/div]
checking whether setpgrp takes no argument... configure: error: cannot check setpgrp when cross compiling
configure failed for srclib/apr