Advanced search  


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

Pages: [1]   Go Down

Author Topic: Exec() has been disabled  (Read 3524 times)

0 Members and 1 Guest are viewing this topic.


  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 12
  • Another addict
Exec() has been disabled
« 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)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
Re: Exec() has been disabled
« Reply #1 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.
Pages: [1]   Go Up

Page created in 0.037 seconds with 19 queries.