PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Well why should I? All the script is doing, is CHMODing a file in 3 directories away, and then attempting to write to it. But it doesn't work. Could it be because of like the 'owner' or whatever I need to change? The script works fine on my computer, but then when I upload it to a real server and try it, I get that error when I execute it. And of course, all permissions on the directories leading up to the file are at 777.
Here's the original post in case someone else is searching this forum with the same question:
PencWeb wrote:Ok now the following error happens because I want to write to a file I have created and CHMOD to 777, but it gives me this error instead What are the numbers "10003" and "2525" suppose to mean? I don't know if I'm getting this error because I am basically creating a file in 3 directories ahead of where the script is held. But I really need help on this, please!
Warning: SAFE MODE Restriction in effect. The script whose uid is 10003 is not allowed to access boards/topics/Socializing/Please work!+data owned by uid 2525 in /usr/local/psa/home/vhosts/penchosting.com/httpdocs/my1bb/topic.php on line 199
Hmmm... Well basically all the people that gave solutions to solve this, had access to their php.ini file, and I really don't, cuz it's on a server that I totally do not have access to those kinds of files.
But how would I get it to work, with just dealing with functions?
Would this work: (myuid() and fileowner()) as UID = 0
And how would I use it correctly to bipass the stupid safe mode?
Is there some sort of FUNCTION that can do this? I don't want to have to get my host to do it by editing the php.ini file
This is a BB I am making, it wouldn't be smart to have a requirement of Safe Mode be turned off, or that the consumer has to have access to adding something to the php.ini file Just won't work!
to see what level your webserver admin(s)/host have set it up as and maybe have a talk with them to see if they can lower some of the restrictions for you. I appreciate that you don't want to ask them but you'll probably have to I find it unlikely that there'd be a way (having never had to deal with safe mode I can't be 100% about this) of disabling it other than in the php.ini. If you explain the problem to your host they may have some suggestions of how you can get things working on their server.
Yeah I've already looked at phpinfo(). Safe Mode is on, and so is the Open Base Directory thing. Perhaps I'll talk to my host, although, this is not the route I wanted to go.
Oh hey, do you know how I can write to a file with using the function system() ?