safe mode

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!

Moderator: General Moderators

Post Reply
cooler75
Forum Commoner
Posts: 40
Joined: Wed May 29, 2002 2:43 pm
Location: RichIsland

safe mode

Post 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:
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

in php.ini change this line:

safe_mode = On

to this line

safe_mode = Off
cooler75
Forum Commoner
Posts: 40
Joined: Wed May 29, 2002 2:43 pm
Location: RichIsland

Post 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
MattF
Forum Contributor
Posts: 225
Joined: Sun May 19, 2002 9:58 am
Location: Sussex, UK

Post by MattF »

I think that uploading is always disabled if safe mode is on.
cooler75
Forum Commoner
Posts: 40
Joined: Wed May 29, 2002 2:43 pm
Location: RichIsland

Post 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
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post 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
Post Reply