We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20135
    • 188 Posts
    Hi,

    I’m having problems with Uploading/Resynching a gallery. Unfortunately the only error message I get is a HTTP 500 - Internal server error, so I’m not even sure where the problem resides. Let me try to explain what I’ve noticed.


    • To start, all folders have the correct permissions, and all snippet files in /snippets/maxigallery are freshly copied (unedited) from the 0.5.2 download. This has been working fine on previous servers. Also, php.ini upload_max_filesize is at 10mb, the files I’m uploading are barely 100k.
    • In my Modx site tree, I have a container (pageid=31) with [!MaxiGallery? &display=`childgalleries`!]. On this page the Manage Pictures button shows when previewed. I also have a single child page (pageid=63) using [!MaxiGallery? &display=`embedded`!]. This also shows the Manage Pictures button. The error occurs on both pages in the same way, so I will describe the process using 63.
    • On clicking Manage Pictures, all buttons display with the 10 browse inputs. Selecting images is fine, and all buttons but 2 seems to work fine at this point.
    • The problem exists in clicking either the Upload Pictures or the Resynch Gallery buttons. At this point the browser heads straight to the Internal server error page ("This page cannot be displayed..."). However, other things happen on the backend that I can’t work out and don’t otherwise generate an error.
    • If Uploading Pictures, the first (or only) file is uploaded to the folder; this is the only file. If Resynching Gallery, 1 of the images is renamed with a 1 placed at the beginning of the file name. Nothing else is done at the file level.
    • In the Mysql DB, the maxigallery table is created, however no information is placed into the table.
    • Once the Internal server error is shown, hitting the back button shows the "Cannot find server or DNS Error" message. Hitting the back button again returns me to page 63 with the Manage Pictures button, no images, no information at all, as though it never happened.

    I’m using a Linux RHEL5 server running Apache 2, PHP 5.2.9, Mysql 5.0.45. Modx version is 0.9.6.3.

    I’ve not seen another post like this. Can someone give me any pointers as to what the error might be?
      • 7923
      • 4,213 Posts
      Do you have mod_security or similar enabled? Those systems can restrict file uploading and posting from forms.

      See this page: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me

      EDIT: also try the v0.6 test version (attached in sticky topic)


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 20135
        • 188 Posts
        In the past I have had a look at the htaccess file to determine if mod_security may be a cause of other problems, but it didn’t seem to make a difference then. I will have a look at it again, but I’m pretty sure mod_security isn’t being used. In either case, would that prevent MG from writing to the database?

        After doing some further testing, I’m now more sure that the error isn’t necessarily with with MG or Modx, but rather with how MG interacts with the server. I will have to speak with the host to determine the solution, but I’m still hoping that someone on here can tell me what the problem is.

        Thanks.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Almost sounds like filenames the server doesn’t like. Spaces or non-alphanumeric characters in any of the names, perhaps?
            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
            • 20135
            • 188 Posts
            Good question - there aren’t any spaces or odd characters in the file names. The files have previously been used on another website with MG, and I’ve been trying both uploading the images and resynching them, to no avail.
              • 20135
              • 188 Posts
              Quote from: doze at May 06, 2009, 06:01 AM

              Do you have mod_security or similar enabled? Those systems can restrict file uploading and posting from forms.

              See this page: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me

              EDIT: also try the v0.6 test version (attached in sticky topic)

              I’ve re-enabled the htaccess file I used a while ago, and included most of the directives from the link you gave me with no effect.

              Also, the mod_security would only affect the uploading of files, correct? It shouldn’t stop the resynching of the images and entry into the DB. should it? At this stage it seems that with either uploading or resynching the problem is still the same: no data is added to the DB, and only the first file is uploaded.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Must be a setting on this server then. Perhaps a timeout, or a size limitation in the php.ini, or even the server configuration?
                  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
                  • 20135
                  • 188 Posts
                  Ok, so I think I may have found the problem. After reading the apache error logs, I discovered that there was an error related to an undefined function "imagecreatefromjpeg". The article below sorted it from there. The error msg was hidden because the host turned the display_errors off in php.ini. >:(

                  http://modxcms.com/forums/index.php/topic,6244.0.html

                  Thanks all for your help. Can’t make the change til 2moro morning, but I’ll post if it is solved. And I’ll post if it’s not smiley