We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13149
    • 13 Posts
    Hi,
    I have another question: Initially, I set up my entire site on a QNAP NAS webserver in my home network. I am now in the process of rebuilding the entire thing on my external hosting web server. I’ve managed to install MODx and am now trying to install E2G. However, when I try to create the Easy2 module (E2G 1.3.5) and paste the php code, it will not save. I get a generic error:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.

    I’ve removed everything, tried again, but it won’t save. I can save the Easy2 module without PHP code (so the Easy2 module shows up in the menu), but if I then paste the code, it still won’t work. Clicking the Easy2 module renders a blank page.
    I don’t think I have access to the server’s error log, but will request assistance from my provider. Still, their support will be limited, as they have no knowledge of E2G I assume. Does anyone have a clue what goes wrong here?
    Thanks!
      • 13149
      • 13 Posts
      By the way, my first idea was that it might be a permissions-issue, so I changed some of the permissions in the Easy2 module folder. This hasn’t helped. But then again, I’m not sure which folders/files require rewriting upon installation...
        • 13149
        • 13 Posts
        I’ve tried pasting the code in parts to see where the error comes from. Everything works fine until the config part (see below in green). I’m not capable of really understanding this code, but my guess would be that it’s still a permissions issue. Can you help me out?

        // CONFIG
        case ’save_config’:

        if (!empty($_POST[’clean_cache’])) {
        unset($_POST[’clean_cache’]);
        $url = $index.’&act=clean_cache’;
        } else {
        $url = html_entity_decode($_SERVER[’HTTP_REFERER’], ENT_NOQUOTES);
        }

        // CHECK/CREATE DIRS
        $_POST[’dir’] = preg_replace(’/^\/?(.+)$/’, ’\\1’, $_POST[’dir’]);
        $dirs = explode(’/’, substr($_POST[’dir’], 0, -1));

        $npath = ’..’;
        foreach ($dirs as $dir) {
        $npath .= ’/’.$dir;
        if (is_dir($npath) || empty($dir)) continue;

        if(mkdir($npath)) {
        @chmod($npath, 0755);
        } else {
        $_SESSION[’easy2err’][] = $lng[’directory_create_err’].’ "’.$npath."’";
        }
        }

        $c = "<?php\r\n\$e2g = array (\r\n";
        foreach($_POST as $k => $v) {
        $c .= "’$k’ => ".(is_numeric($v)?$v:"’$v’").",\r\n";
        }
        $c .= ");\r\n?>";

        $f = fopen(’../assets/modules/easy2/config.easy2gallery.php’, ’w’);
        fwrite($f, $c);
        fclose($f);

        $_SESSION[’easy2suc’][] = $lng[’updated’];

        header (’Location: ’.$url);
        exit();

          • 13149
          • 13 Posts
          narrowed it down further. Issues lies in this part of code:

          $f = fopen(’../assets/modules/easy2/config.easy2gallery.php’, ’w’);
          fwrite($f, $c);
          fclose($f);
          • can you ask for the server’s error logs?
              Rico
              Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
              MODx is great, but knowing how to use it well makes it perfect!

              www.virtudraft.com

              Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

              Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

              Maintainter/contributor of Babel

              Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
              • 13149
              • 13 Posts
              Hi Goldsky,
              I’ve found the error log on the server, I’m including it here. My provider suggests issue might be in the .htaccess file. I actually don’t have one (have a ht.access file), and no idea whether that matters or not. To make sure, I’ve added one, and included the following entries (as suggested by my provider):
              SecFilterEngine Off
              SecFilterScanPOST Off
              I’ve saved the .htaccess file as ".htaccess", but it doesn’t seem to help any.
              • Do you still have the ’install’ folder? If you do, just delete it.
                  Rico
                  Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                  MODx is great, but knowing how to use it well makes it perfect!

                  www.virtudraft.com

                  Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                  Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                  Maintainter/contributor of Babel

                  Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                  • 13149
                  • 13 Posts
                  Hi,
                  I deleted the easy2\install folder. It doesn’t help though.
                  • this is your server’s log said:

                    [Thu May 20 10:51:32 2010] [error] [client xx.xxx.xxx.xxx] mod_security: Access denied with code 500. Pattern match "(chr|fwrite|fopen|...

                    you can not use Easy 2 Gallery, then.
                    or, you can start to think to find a more flexible host.
                      Rico
                      Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                      MODx is great, but knowing how to use it well makes it perfect!

                      www.virtudraft.com

                      Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                      Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                      Maintainter/contributor of Babel

                      Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                      • 13149
                      • 13 Posts
                      Hi Goldsky,
                      thanks so much for helping me look for a solution!
                      Can you explain to me what exactly it is they don’t allow? I’m at a loss.