No Support => Feature requests => Topic started by: v3 on September 10, 2006, 05:01:37 pm

Title: Exec() has been disabled
Post by: v3 on September 10, 2006, 05:01:37 pm
You 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
Code: [Select]
        case "im" :       
        if (!function_exists('exec')) {
        $functions = array ('shell_exec', 'system', 'passthru');
        foreach ($functions as $f) {
        if (!function_exists($f)) {
        function exec(\$cmd) {
        $declared = true;
        if (@!$declared) {
        //display some king of notice or just die
        return resize_image($src_file, $dest_file, $new_size, 'gd2', $thumb_use)
Title: Re: Exec() has been disabled
Post by: Joachim Müller on September 10, 2006, 10:46:40 pm
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.