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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.