Exec() has been disabled Exec() has been disabled
 

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]

Main Menu

Exec() has been disabled

Started by v3, September 10, 2006, 05:01:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

v3

http://forum.coppermine-gallery.net/index.php?topic=24088.msg110691#msg110691
QuoteYou may replace exec() with passthru() if it has not been disabled as well.  Otherwise, you must use GD.

Why not to use function_exists() to check if exec is disabled and if both are disabled display a notice and try to use GD?
something like
        case "im" :       
        if (!function_exists('exec')) {
        $functions = array ('shell_exec', 'system', 'passthru');
        foreach ($functions as $f) {
        if (!function_exists($f)) {
        eval("
        function exec(\$cmd) {
        $f(\$cmd);
        }");
        $declared = true;
        break;
        }
        }
        if (@!$declared) {
        //display some king of notice or just die
        return resize_image($src_file, $dest_file, $new_size, 'gd2', $thumb_use)
        }
}

Joachim Müller

Webhosts who allow their users to access ImageMagick but disable exec just have no idea how to run a webserver. Imo we should not care too much about silly webserver setups (just because that's not our business). Instead, I'm planning to add a check into the installer and config that only will allow a user to change the image library if a check has been performed if the settings the user has chosen actually work.
However, others may have a different opinion on this.
Moving this thread from support to feature requests.