We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Quote from: sottwell at Apr 12, 2010, 11:25 AM

    Ok, here’s a more selective plugin that just removes the GD and Zip error. It’s really not a good idea to be removing all errors; one of them might be important. Remove the leading <?php tag if you use this.
    <?php
    // turn it into an array for easier handling, 
    //there are too many HTML tags and line endings to work directly with the error string
    $errors = explode('Configuration warning', $modx->placeholders['config_check_results']);
    // dig through the array for the GD and Zip warning
    foreach($errors as $key=>$value) {
        if(strpos($value, 'GD and Zip') !==false) $gdkey = $key;
    }
    //drop the GD and Zip warning
    unset($errors[$gdkey]);
    // the first element will be the error list heading
    if(count($errors)>1) {
            // put it back together
            $string = implode('Configuration warning', $errors);
            // replace the error message
            $modx->placeholders['config_check_results'] = $string;
    } else {
            // no other errors, don't show the tab at all
            $modx->placeholders['config_display'] = 'none';
    }
    return;
    


    Hi Susan,

    Where would I put that code please.

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      As for the first one I posted, it’s a plugin and uses the OnManagerWelcomeHome system event.

      In the Manager, go to Elements -> Manage elements, the Plugins tab, and make a new plugin.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 22840
        • 1,572 Posts
        thanks Susan grin
          • 3112
          • 11 Posts
          In FreeBSD 8

          needed to install /usr/ports/devel/libltdl22

          and recompile php adding: --enable-zip

          Works now no warning.

            • 21419
            • 84 Posts
            I’m trying to use Susan’s single-line plugin, but the php keeps getting rewritten with \’ instead of ’.... anyone have any ideas why?

            UPDATE: Seriously, everything I paste or type with quotes gets backslashed. None of the other plugins are having this problem and I know it isn’t an issue with the content I’m pasting or typing (as I’m using what Susan posted - either pasted or retyped). Never had this problem before. Completely frustrated.

            SOLVED: I switched MAMP back to PHP 5.2.13 which has fixed it. magic_quotes were Off in 5.3, so I’m still not sure why there was a problem, but I’m moving on.
              • 5340
              • 1,624 Posts
              Quote from: Onesmarthost at Apr 12, 2010, 11:50 AM

              Hi,

              For any Onesmarthost customers we will be updating our servers PHP Configuration late this evening to enable PHP Zip support which should remove this warning.

              Aaron

              I have to do the same with a windows server. Do you have a link with some instructions.
              Or is it just a module/extension that needs to enabled.

              Would this be enough?

              Thank you
                • 37550 ☆ A M B ☆
                • 711 Posts
                Hi,

                On our Windows Servers which run PHP5 in FastCGI Mode we just added this to the php.ini of the server:

                [PHP_ZIP]
                extension=php_zip.dll

                Then you will need to do an iisreset
                  http://www.onesmarthost.co.uk
                  UK MODX Hosting with love.
                  • 12943
                  • 97 Posts
                  Thanks, plugin does fine == no more configuration in red == no more clients mailing "wassup?" tongue
                  I am on CentOS 5.3 running BlueOnyx and I have to wait for a Php-update rather than install or compile stuff myself. Also I needed the plugin localhost on MAMP 1.8 (didnt check new MAMP 1.9 yet).
                    Accelerate your Windows system with 9.8 m/s2.
                    • 15003
                    • 85 Posts
                    I’m also getting the "Configuration warning: ’GD and/or Zip PHP extensions not found’" error. The php info file it says that GD is supported so I don’t understand why I’m getting the error.

                    gd
                    GD Support enabled
                    GD Version bundled (2.0.34 compatible)
                    FreeType Support enabled
                    FreeType Linkage with freetype
                    FreeType Version 2.2.1
                    GIF Read Support enabled
                    GIF Create Support enabled
                    JPG Support enabled
                    PNG Support enabled
                    WBMP Support enabled
                    XBM Support enabled

                    I just went live with a site and was not getting this error on my testing server. The hosting provider for the live site thinks it’s an issue with the application itself which isn’t retrieving the sever settings. Since I wasn’t getting the error on the testing server (out in the wild, not local) I’m thinking it’s the hosting provider that my client is using.

                    Does anyone have any info or suggestions?

                    Jules
                      • 10487 MODX Staff
                      • 1,535 Posts
                      @Jules - you have GD which means you are most likely missing the Zip extension.
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com