forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Joachim Müller on September 06, 2004, 09:48:15 am
-
Casper has reported this issue before (I can't find the thread where he reported this issue): apparently for more recent versions of php than I have access to the GD info in debug_output didn't work - it used to display "GD module not found", although it actually existed on the server. I tried to apply a fix (check out the devel branch), but I'm not sure if it works (as I don't have access to more recent versions of PHP than 4.3.3, and I can't upgrade the existing installs). Please test and mark this thread as fixed if it works for you. Thanks.
Joachim
-
Hi Joachim,
this was first reported here (http://forum.coppermine-gallery.net/index.php?topic=4319.0),
and discussed here (http://forum.coppermine-gallery.net/index.php?topic=8159.msg36128#msg36128), and by subsequent pm.
Thought it was fixed, but will retest.
-
Well, I was wrong it's not fixed.
The problem is this.
The debug output shows;
Module: gd
------------------
module doesn't exist
==========================
Module: mysql
------------------
module doesn't exist
This is of course incorrect, both modules exist and are in use. The phpinfo accessed through admin tools is correct.
The server this happens on uses php version 4.2.2. This only appears to happen for GD1, if GD2 then it works correctly.
-
Casper, you sent me your phpinfo html output the other day so I could look into this. Could you send it once again please? Thanks.
Joachim
-
Hi Joachim,
here is a copy of the output, as displayed i the debug info.
-
hrm, I should have specified this even more: I need the html output that get's generated if you actually run a phpinfo file on your server (<?php phpinfo(); ?>), as the debug output uses the module definition in php if it exists - if it doesn't, it falls back to the html output from phpinfo that is being flushed into a var and then checked for existance of some patterns. As I will have to adjust those patterns, I need the actual html output (not just plaintext).
Joachim
-
Attached file is the full html source code for the info.php
-
just bumping this thread to the first page - will have to look into this issue (self-assign).
Joachim
-
I can't figure this out. But I would put this at the bottom of the list for jobs needed doing, as we know about it, and the info given from the admin tools phpinfo is correct, can we just not mark this as a known issue for now, and ask users to get their info from admin tools.
-
I committed to the devel branch of the cvs these changes:
function cpg_phpinfo_mod($search)
{
// this could be done much better with regexpr - anyone who wants to change it: go ahead
ob_start();
phpinfo(INFO_MODULES);
$string = ob_get_contents();
$module = $string;
$delimiter = '#cpgdelimiter#';
ob_end_clean();
// find out the first occurence of "<h2" and throw the superfluos stuff away
$string = stristr($string, 'module_' . $search);
$string = eregi_replace('</table>(.*)', '', $string);
$string = stristr($string, '<tr'); // changed '<tr>' to '<tr', as older versions of php had the table row formatted by html means
$string = str_replace('</td>', '|', $string);
$string = str_replace('</tr>', $delimiter, $string);
$string = chop(strip_tags($string));
$pieces = explode($delimiter, $string);
foreach($pieces as $key => $val) {
$bits[$key] = explode("|", $val);
}
return $bits;
}
Casper, could you please check and confirm, so I can add this to the stable branch as well? Thanks
Joachim
-
*bump*
Casper, could you please test this?
Joachim
-
Sorry for the wait, I'd all but stopped testing on that server.
Yes, your changes work fine, the info is now given correctly, thanks.