We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13137
    • 204 Posts
    I am receiving the following error and dont know what to do???

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

    PHP error debug
    Error: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 10006 is not allowed to access /var/www/vhosts/cit-tenerife.com/httpdocs/assets/galleries/54 owned by uid 48
    Error type/ Nr.: Warning - 2
    File: /var/www/vhosts/cit-tenerife.com/httpdocs/assets/snippets/maxigallery/maxigallery.php
    Line: 371
    Line 371 source: move_uploaded_file( $_FILES[’file’.$i][’tmp_name’] , $mg->path_to_gal.$name );

    Parser timing
    MySQL: 0.0008 s (1 Requests)
    PHP: 0.0410 s
    Total: 0.0418 s

    I have searched the forums, but cant find anything. Can anyone point me in the right dirrection, Im starting to freak out now.

    I am using the latest Modx .9.6 and the last MaxiGallery 5.2
      • 7923
      • 4,213 Posts
      you need to setup maxigallery to use the ftp commands.. see maxigallery wiki page and the parameters there that have "ftp" in the name.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 30878
        • 3 Posts
        Quote from: doze at Aug 01, 2007, 01:34 PM

        you need to setup maxigallery to use the ftp commands.. see maxigallery wiki page and the parameters there that have "ftp" in the name.

        I got the same problem. And I have use the ftp parameters. And still got the same problem. What could it be?
          • 7923
          • 4,213 Posts
          If you are using the ftp commands correctly and are still having the exactly same error message, then I don’t know.. very weird environment setup..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 9549
            • 93 Posts
            One of my hosts has recently updated their PHP version and now I’m getting some permission failures. The script is not allowed to create directories anymore. I tested to use the ftp paramaters in the snippet call but it doesn’t seem to work.

              Error: 	mkdir() [function.mkdir]: Unable to access assets/galleries/58/	 
              Error type/ Nr.: 	Warning - 2	 
              File: 	/customers/fotograf-roland.se/fotograf-roland.se/httpd.www/assets/snippets/maxigallery/maxigallery.php	 
              Line: 	313	 
              Line 313 source: 	if(!mkdir($mg->path_to_gal, 0777)) {
            


            ...and my snippet call looks like this:
            [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &pics_per_row=`3` &max_thumb_size=`110` &quality_thumb=`100` &quality_pic=`95` &max_pic_size=`400` &lang=`sv` &disable_rightclick=`1` &ftp_pass=`******` &ftp_port=`21` &ftp_server=`ftp.fotograf-roland.se` &ftp_user=`fotograf-roland.se` &ftp_base_dir=`/`!]


            I’ve tested both cached (and doc is uncached) and uncached..

            My setup...

            PHP: 5.2.4
            MaxiGallery: 0.96
            MODx: 0.96
              • 7923
              • 4,213 Posts
              Have they possibly enabled phpsuexec or similar.. Then you cannot chmod directories over 755 and files over 644. Eg. you have to do search replace in maxigallery code and replace 0666 with 0644 and 0777 with 0755.

              Or you can update to SVN code, there are two new snippet parameters to set the chmod values &chmod_folders and &chmod_files. But I have not had time to test the SVN code thoroughly, so not sure if it works ok..


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 9549
                • 93 Posts
                I asked their support and they had indeed activated phpsuexec. The problem was the slash in the end on row 238 in maxigallery.php. I got it to work by adding another $mg->path_to_gal variable. I also changed the chmod settings to 755 and 644.

                $mg->path_to_gal=$path_to_galleries.$mg->pageinfo['id']."/";
                //EDIT
                $mg->path_to_mkdir=$path_to_galleries.$mg->pageinfo['id'];
                


                ...which I later recall at line 315.

                if(!mkdir($mg->path_to_mkdir, 0755)) {
                


                I suppose this is a quick-fix smiley
                  • 31899
                  • 8 Posts
                  Hello!
                  I have the same problems as feary. I changed the chmod from 777 to 755 and 666 to 664, and I also tried to add fearys fix code. But still the same problem. What else can I do?
                    • 7923
                    • 4,213 Posts
                    Quote from: wahlbars at Nov 26, 2007, 05:15 AM

                    I changed the chmod from 777 to 755 and 666 to 664, and I also tried to add fearys fix code.
                    chmod directories 755 and files 644.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 31899
                      • 8 Posts
                      I have chmod the directories. When I upload images via ftp and push "Resync gallery" it works just fine. But when I upload via the webinterface I still have the same problem.
                      I’m using Modx ver. 09.6.1and MaxiGallery ver. 0.52.