We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16639
    • 26 Posts
    Hello! I’m trying to add images to maxigallery, but when I click upload pictures, it shows the following screen -
    The images though are uploaded correctly. Does anybody know - what kind of problem is this?

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: chmod() [function.chmod]: No such file or directory
    Error type/ Nr.: Warning - 2
    File: /home/numkod/public_html/assets/snippets/maxigallery/maxigallery.php
    Line: 372
    Line 372 source: chmod($mg->path_to_gal.$name,0666);

    Parser timing
    MySQL: 0.0016 s (6 Requests)
    PHP: 0.2700 s
    Total: 0.2716 s

    Thanks for your support.
      • 7923
      • 4,213 Posts
      What version are you using? Can you try to update to SVN version? You can find MaxiGallery SVN information from this thread http://modxcms.com/forums/index.php/topic,6077.0.html


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 23536
        • 2 Posts
        Hi,

        I’m having the exact same problem (version is 0.5.2) and php version PHP Version 4.4.4-8+etch4 running on Apache 2. It appears to be PHP related, but I don’t speak very fluent PHP so I’m having a tough time figuring this out. I hope someone here can shed some light on this, as I’ve lost the better part of the weekend smiley It has to do with move_upload_files(). It actually fails the first time (though the file copy succeeds). I did the following

        if (move_uploaded_files(...)){
        print "error moving the files";
        }

        and sure enough, I get an error each time. However, *after* the script exits, the files show up in the directory!!! I tried adding some loops in there to see if it was timing related:

        while (!file_exists(...));
        chmod(...);

        that didn’t work.

        I also tried

        while (!move_uploaded_files(..));

        That *still* failed, though when the script timed out, I ended up with like 4 copies of the files in my folder...

        So basically, until the script exits, the files don’t show up in the gallery folder. This very bizarre yet also very repeatible. I found this after some googling: http://us2.php.net/manual/en/function.move-uploaded-file.php#77579
        and so I changed the call from move_uploaded_files() to copy(). This actually *does* work, however, I also ended up with some duplicates of my uploaded files. Grrrrrr.....

        So I did some more screwing around and this problem is really sporadic. I had one gallery (the parent) where I could consistently upload files. I then started screwing around with the parameters to see if it was parameter related, and I was able to break it. However, putting back the original parameters didn’t restore functionality, so now I have no working galleries. I screwed around some more by creating more galleries, and was finally able to get one to work (again), but it’s only a matter of time until it, too, dies.

        Any help would be appreciated (and also a reference to a good hair-implant surgeon, I’ve pulled out most of mine...)
          • 23536
          • 2 Posts
          Just for closure:

          I never did get this working on PHP4. However, I upgraded to PHP5 and now everything works fine, so....
            • 20349 ☆ A M B ☆
            • 453 Posts
            I got similar error when I didn’t make new folder in which I was planing to put the pictures....
            When I added that folder on FTP and changed the path in MaxiGallery snippet...it all worked fine....

            ...maybe it’s something similar... dunno
              BASE - Web Design Studio
              MODX Ambassador

              Website
              • 13809
              • 16 Posts
              I’m having same error when uploading images... I downloaded Maxigallery 0.5.2 latest version from the Resourses Repository and I was following the ’Picture and thumbnails on same page’ step by step instructions as provided in http://wiki.modxcms.com/index.php/MaxiGallery ... my gallery has 777 permissions on server.
                • 18830
                • 161 Posts
                I just had the same problem and maybe found the solution. Please check the owner rights of the gallerie´s folder. It has to be wwwrun. If you upload or changed the folder via ftp the owner will be set from your server to something else. You should be able to change the owner with the control center of your webspace.