Page 1 of 1

safe mode

Posted: Wed Aug 14, 2002 11:26 am
by cooler75
hello,
could somebody tell me what safe mode does in php?
i have an upload picture script that will NOT work when safe mode is turned on.
how do I go to correct this? The only way is to turn safe mode off so i can upload picture properly?

or is there any article about uploading picture good either with safe mode on or off?


thanks :roll:

Posted: Wed Aug 14, 2002 12:30 pm
by protokol
in php.ini change this line:

safe_mode = On

to this line

safe_mode = Off

Posted: Wed Aug 14, 2002 1:04 pm
by cooler75
hi thanks

I know how to turn safe mode off, I'd like to find out if there is anything we can do to my script so pictures can be uploaded either with the safemode on or off.

thank you

Posted: Wed Aug 14, 2002 1:34 pm
by MattF
I think that uploading is always disabled if safe mode is on.

Posted: Wed Aug 14, 2002 4:42 pm
by cooler75
I think that uploading is always disabled if safe mode is on.

Hi, thanks
so you are saying uploading pictures WILL NOT work when safe mode is on?

So what's the point of hosting my sites with those web hosting company where they have safe mode turned off?

More inputs on this please

thank you

Posted: Wed Aug 14, 2002 11:10 pm
by protokol
You could put this at the top of the script when safe_mode is on.

ini_set("safe_mode", "0"); // turn safe_mode off

When the script is finished executing, the value goes back to the default