We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21700
    • 42 Posts
    Hi, I’m having trouble with MaxiGallery & MODx, both latest versions. I get this error when I upload an image:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	ini_set() has been disabled for security reasons	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	/data/members/paid/e/s/escape-project.net/htdocs/modx/assets/snippets/maxigallery/watermark/Thumbnail.class.php	 
      Line: 	343	 
      Line 343 source: 	ini_set('memory_limit',$this->memory_limit); 	 
     
    Parser timing
      MySQL: 	0.1164 s s	(6 Requests)
      PHP: 	0.6920 s s	 
      Total: 	0.8084 s s


    Is there any workaround for this? Because I do see this has to do with the limitations set on PHP usage by my hosting provider (lycos). They’re using PHP 4.3.10 with safe_mode on. They also disabled the following commands:

    * highlight_file
    * diskfreespace
    * exec
    * passthru
    * system
    * popen,
    * pfsockpen
    * show_source
    * php_uname
    * ini_alter
    * ini_restore
    * ini_set
    * getrusage
    * mysql_list_dbs
    * get_current_user
    * set_time_limit
    * getmyuid
    * getmypid
    * dl
    * leak
    * listen
    * chgrp


    So.. my questions are: could these disabled commands cause any other issues I haven’t yet encountered?
    And is there a workaround for the disabled ini_set?

    Thanks!
    n`
      • 21255
      • 215 Posts
      Try to comment out line 343 in assets/snippets/maxigallery/watermark/Thumbnail.class.php - it should work anyway smiley
        • 21700
        • 42 Posts
        Is this class responsible for watermarking the images? I do not want to use that anyway (I watermark manually with EXIF information in photoshop), so is there a way to disable that alltogether? (without throwing errors all over the place wink)

        Oh and on line 344 is ini_set also used, commented it out too smiley

        after test: can’t believe it, it worked, it’s really that simple! But now I get an error 403 when I’m trying to view my uploaded images huh
          • 7923
          • 4,213 Posts
          Quote from: noes at Sep 16, 2006, 02:02 PM

          Is this class responsible for watermarking the images? I do not want to use that anyway (I watermark manually with EXIF information in photoshop), so is there a way to disable that alltogether? (without throwing errors all over the place wink)
          The thumbnail class is used to make all the pictures (eg. all sizes) and watermarks. So, even if you don’t use watermarks, you can’t remove it. But you can comment out the ini_set’s, they are there to just try to make it possible to do longer processes via php, because the picture processing can take a lot of time if certain filters are used an/or the pictures are large.

          after test: can’t believe it, it worked, it’s really that simple! But now I get an error 403 when I’m trying to view my uploaded images huh
          Odd.. have you set all the directory/file permissions correctly on your server, so that public users has read access to the pictures? do you have example url?


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 21700
            • 42 Posts
            Yes I did, I checked it all: mode is 755 or 766, even 777 didn’t work. Please: http://modx.escape-project.net/ is my test-setup. The template is even already installed (still working on it).

            I don’t understand, do you?

            thnx for taking the time, n`
              • 7923
              • 4,213 Posts
              So you have galleries folder in assets and "1" folder there generated by the snipped and some pictures in that folder? Have you looked at the permissions of galleries folder itself, and the folder "1"? Both should have 0777. But it’s definitely some permission issue. What are the permissions on this file for example:

              http://modx.escape-project.net/assets/galleries/1/tn_dsc00635_web.jpg

              it sound very weird if that url won’t open if that file exists and the permissions are atleast 0644


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 21700
                • 42 Posts
                I really don’t and can’t understand this.. the permissions are set 764, set with multiple FTP programs (LeechFTP and the FTP command in Linux). I even reset them to 000 & replaced it to 764 again, just to make sure. Is there anything that might block access? I do not have an .htacces in the whole tree (not any that I know of, that is) in which MODx/MaxiGallery is installed. (http://modx.escape-project.net/).

                I simply can’t see the cause of this problem, or I’m simply overlooking something..

                edit: I simply can’t believe it! I re-set the permissions, now with 765 on the galleries-folder +subfolders, and I can see the images now.. As far as I know/knew 666 is enough to make things viewable by everyone..

                Thank you for all your help! I already recommended MODx+MaxiGallery to a couple of friends with websites, I know I did the right thing!