i realy nerver mat this error///

Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 10045 is not allowed to access /var/www/vhosts/liad-marble.co.il/httpdocs/guides/guides/6 owned by uid 48 in /var/www/vhosts/liad-marble.co.il/httpdocs/guides/adminpanel/guide.php on line 231

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 10045 is not allowed to access /var/www/vhosts/liad-marble.co.il/httpdocs/guides/guides/6 owned by uid 48 in /var/www/vhosts/liad-marble.co.il/httpdocs/guides/adminpanel/guide.php on line 237

Warning: fopen(../guides/6/index.html): failed to open stream: No such file or directory in /var/www/vhosts/liad-marble.co.il/httpdocs/guides/adminpanel/guide.php on line 237 

    When safe_mode is in effect, a script can only open files that are owned by the same user as the script file itself. Depending on what these other files are, you may end up having to copy them with the same account you use to create the script, then reference those copied files instead. Or possibly, depending on your situation, you can have the system administrator chown the files so that they have the same owner.

      i dont know if its possible to do it.
      because the script i write in my computer...and the file i try to handle with, made with mkdir/mkfile() functions =...
      it will change the fact if i will edit the file and save it with ftp editor? it will change the ownership?

        Editing will not change ownership. Ownership is established by who creates the file initially, and from that point on can only be altered by a user with super-user (root) privilege. If the files are being created by your web application, they likely are owned by the web-server user, not your personal account. Therefore, I suppose you could write a little php web script to copy your script to a new file, so that the web-server user owns it, too, but that's getting ugly, isn't it?

        Depending upon what you are trying to do, I suppose you could try using [man]cURL[/man] to read the files via a URL to the local host, but that seems equally ugly. :rolleyes:

        Another alternative is to talk to the sysadmin types and get them to set the safe_mode_gid option to "on", and then make sure that your user ID and the web-server user ID share a common user group.

          the first tow options you offerd cant be,
          because same as i try to create file and handle it ...i will have to create outher file ...
          if you get what im trying to say...

          the therd option, i dont think i cant ask for that from hosting company.. =\
          ther is now outher way to handle it with user side? like code or attributes or something?

            You cannot turn off safe_mode from the application side of things, only from the system configuration side (typically the php.ini file). Therefore, to access files via the file system from your PHP script, those files must be owned by the same user that owns the script. There is no work-around other than ensuring they all have the same ownership, otherwise there would be no purpose to turning on safe_mode in the first place.

              yeh that i know , but i didnt tryed to find way to turn safe_mode_gid of...
              only way to by pass it,
              because as you say ther is no way to mkfile() of hosting server when safe mode is on!
              i cant belive the only option is to contect the host master, ther got to be other way!..

              i will read about it abit, and will post ther results, have a good day for now..

                NogDog...i thught about some thnig, tell me if it makes any sens
                if i will create the files over mycomputer...
                and just copy them insted of mkdir...it will work?

                  Write a Reply...