Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a bit confused about what to do : Should I put PHP safe mode on even though it does break some websites code?

I have had several joomla websites hacked, but I'm not sure why, maybe it is safemode. I'm still investigation that...

Is safe mode only for debugging, and so it doesn't really matter that much for security right?

This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.


I have PHP v 5.2.14, apache, CentOS and cpanel.

Thanks a bunch :)

share|improve this question

closed as off-topic by HopelessN00b, Ward, mdpc, MadHatter, Jim B Feb 27 at 13:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

It shouldn't break any of your sites persay, unless you are attempting to do something that is forbidden in "safe mode". Which I can't see joomla breaking. Safe mode is just a way to prevent a multi-user system running PHP from each of the user's doing evil stuff to each other using PHP scripts (ie file writes, file reads). I don't know why they are removing it, perhaps someone else can fill in that blank?

However, a question to you is:
Are you keeping up with the latest patches for your joomla installs?

share|improve this answer
Thanks Nathan, I've had a couple sites hacked and I updated every website to the latest version 1.5.21 I thought it was over and that I was safe, but no! Yesterday my joomla website was hacked and so I started to think that maybe it is something else... I'm looking through the logs right now, trying to figure out how the hacker did it, but no clue yet :( – Zenet Nov 6 '10 at 17:24
Are you sure your configuration is correct for Joomla? I believe there are a number of ways that it can be compromised if you don't take great care with the security. Are you certain users can only write to the correct locations on the disk? Do you know that your webserver will not execute code at those locations? Joomla will prevent some of this, but definitely not all of it. – Paul McMillan Nov 6 '10 at 17:52
@samantha Perhaps you could post links to your log files and we look at them? There might be something that jumps out to us that doesn't to you. – Nathan Adams Nov 7 '10 at 21:16

Joomla's take on Safe mode: Why shouldn't you use PHP safe mode? (in short, it will usually work OK, apart from the initial install, but safe mode isn't the best idea in the first place)

It doesn't quite solve the problem, and it's also fairly easy to get around. There are better ways to slve the problems, so it's being depreciated.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.