We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27512
    • 3 Posts
    Can you please provide me with a link so I can download version (v0.6). Can you also make sure this contains the snippet code. I have been trying to setup the maxigallery on a website for some time but constantly receive an ’mkdir() [function.mkdir]’ error message (see below) when trying to upload images via the manage pictures button. I have read in a previous post v0.6 sorts this problem out. Is that true? I am currently using MaxiGallery version 0.5.2 (installing on MODx Evolution 1.0.2) and have tried all the post recommending code and permissions changes with no postive effect. I can’t set PHP to Safe Mode as on a VPN server with no access to this setting.

    Error: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access assets/galleries/48/ owned by uid 48
    Error type/ Nr.: Warning - 2
    File: /var/www/test/snippets/maxigallery/maxigallery.php
    Line: 313
    Line 313 source: if(!mkdir($mg->path_to_gal, 0777)) {
      • 7923
      • 4,213 Posts
      The v0.6 test version is attached in the first post of this thread. You can use the same snippet code, just replace files in your ftp. Read the first post fully.

      But your problem relates to php safe mode and not really a mkdir issue. You can find answer to your question in the other sticky topic (http://modxcms.com/forums/index.php/topic,36851.0.html). Check the links in the FAQ section.



        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 27512
        • 3 Posts
        Thanks for your message. I have upgraded to version (v0.6). Unfortunately I am still getting the (mkdir() [function.mkdir]:) error listed below. As indicated in the post above I have looked at all previous posts but nothing seems to work? Can you please suggest an alternative fix? Many Thanks in advanced. PS: I cant enable safe mode in php as I am running Centos on a virtual private server.

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

        PHP error debug
        Error: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access assets/galleries/48 owned by uid 48
        Error type/ Nr.: Warning - 2
        File: /var/www/httpdocs/assets/snippets/maxigallery/maxigallery.php
        Line: 359
        Line 359 source: if(!mkdir(substr($mg->path_to_gal, 0, -1), octdec($mg->mgconfig[’chmod_folders’]))) {

        Parser timing
        MySQL: 0.0020 s (5 Requests)
        PHP: 0.0411 s
        Total: 0.0431 s
          • 7923
          • 4,213 Posts
          Like I said above, the answer to your question is in the FAQ. See this.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 27512
            • 3 Posts
            Hi there. Please please can you help. Still having problems. Can you please specify exactly how ftp syntax should be used. Also getting a new error now. Have you seen this one before? Many Thanks in advanced

            PHP error debug
            Error: include() [function.include]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/site1/httpdocs/assets/snippets/MaxiGallery/maxigallery.php owned by uid 48
            Error type/ Nr.: Warning - 2
            File: /var/www/site1/httpdocs/manager/includes/document.parser.class.inc.php(770) : eval()’d code
            Line: 74


              • 7923
              • 4,213 Posts
              Its the same error as in your three posts above, and it is a common error in miscofigured server environments. Your apache user does not have rights to move the uploaded files from the temp location to the folders it creates.

              Here are the parameters you need to add to your snippet call from the wiki:

              &ftp_base_dir
              Path to go from FTP root to MODx installation root. Eg. if your FTP root directory is /home/username/ and MODx is installed in /home/username/public_html/modx/ you would use /public_html/modx/ as ftp_base_dir.

              &ftp_user
              FTP account username

              &ftp_pass
              FTP account password

              &ftp_port
              Port number for the FTP service.

              &ftp_server
              FTP address to the server running MODx.

              When you add those parameters to the snippet call, maxigallery uses php ftp commands to connect to the FTP server and upload the pictures via FTP. That should solve your permission issues. Don’t know how could I help you any better.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."