Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Incorrect GD version display in debug output  (Read 5681 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Incorrect GD version display in debug output
« 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
« Last Edit: March 05, 2005, 08:54:33 pm by TranzNDance »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Incorrect GD version display in debug output
« Reply #1 on: September 06, 2004, 10:29:26 am »

Hi Joachim,

this was first reported here,
and discussed here, and by subsequent pm.
Thought it was fixed, but will retest.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Incorrect GD version display in debug output
« Reply #2 on: September 06, 2004, 10:41:14 am »

Well, I was wrong it's not fixed.

The problem is this.

The debug output shows;
Quote
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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Incorrect GD version display in debug output
« Reply #3 on: October 23, 2004, 11:28:58 am »

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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Incorrect GD version display in debug output
« Reply #4 on: October 23, 2004, 11:53:38 am »

Hi Joachim,

here is a copy of the output, as displayed i the debug info.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Incorrect GD version display in debug output
« Reply #5 on: October 24, 2004, 03:30:10 pm »

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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Incorrect GD version display in debug output
« Reply #6 on: October 24, 2004, 09:13:08 pm »

Attached file is the full html source code for the info.php
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Incorrect GD version display in debug output
« Reply #7 on: December 28, 2004, 09:23:32 am »

just bumping this thread to the first page - will have to look into this issue (self-assign).

Joachim
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Incorrect GD version display in debug output
« Reply #8 on: December 28, 2004, 12:18:35 pm »

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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Incorrect GD version display in debug output
« Reply #9 on: March 01, 2005, 08:01:40 am »

I committed to the devel branch of the cvs these changes:
Quote
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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Incorrect GD version display in debug output
« Reply #10 on: March 04, 2005, 09:32:17 am »

*bump*
Casper, could you please test this?

Joachim
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Incorrect GD version display in debug output
« Reply #11 on: March 04, 2005, 05:52:56 pm »

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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.