Wednesday, May 23rd

Last update05:36:30 AM GMT

Font Size

Screen

Profile

Layout

Menu Style

Cpanel
Welcome, Guest
Username Password: Remember me

Switching on safe mode
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Switching on safe mode

Switching on safe mode 4 years, 3 months ago #230

  • RoscoHead
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
In reply to the question asked at the MJUG meeting last night, if your host insists on having safe mode and/or magic quotes off, you can switch them on for just your site, as long as your host allows Apache overrides. If they don't, ask them to consider it. If they won't, switch hosts

First, create a php.ini file containing the following:
--- php.ini ---
register_globals = 0
magic_quotes_gpc = 1
safe_mode = 1
--- end ---

and save it somewhere on your site. I recommend outside the public_html directory, as it doesn't need to be accessible via http. I use /etc because I'm a Unix tragic. Now, either create, or append to your .htaccess file in both your Joomla! root directory AND the administrator sub-directory, the following lines:
--- .htaccess ---
## PHP config
suPHP_ConfigPath /path_containing_php_ini/
--- end ---

Note that this should not include php.ini at the end - PHP assumes that filename and it cannot be changed. Once you've done this, reload the page; if you get a server error, your host more than likely does not allow Apache overrides. I recommend trying this on the administrator directory first, so you don't upset too many users if it doesn't work

Hope this helps

(Note this is for PHP 4, I haven't tried on PHP 5 yet - I'm not sure it's even required.)

ROSCO

Re:Switching on safe mode 4 years, 2 months ago #239

  • Partic
  • OFFLINE
  • Moderator
  • Posts: 341
  • Karma: 21
Where was this post two weeks ago

That's a much better way to apply the php.ini site wide. Perhaps that should be added to the Joomla Security Checklist, as I've not seen a better way of applying the php.ini site wide. help.joomla.org/component/option,com_eas...w/id,167/Itemid,268/
Patrick Jackson
www.kpsystems.com.au
Ask Anything Joomla and I'll helpfully tell you where to go
  • Page:
  • 1
Time to create page: 0.35 seconds
You are here: Forum