LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-24-2012, 01:52 AM   #1
lenka
LQ Newbie
 
Registered: Sep 2012
Location: Denmark
Distribution: Ubuntu something (11 I think - upgrading to 12 soon)
Posts: 17

Rep: Reputation: Disabled
Safe mode - on or off? (and a bonus question on how to find a configuration error)


A couple of weeks ago I tried to install java on my server, just to play with. It showed to be a mistake, since suddently I got an error on my active webforum. The erorror was a http 500 internal server error

I checked my error-log file for the page (there was no error on other pages on same server) and it said something with safe mode, so I disabled safe mode in php.ini. I thought it already was disabled but apparently not.

Now my main question is: what is safe mode for?

And bonus questions: if I was to turn it back on, then how can I find what is wrong with my web page when safe mode is turned off?

(bonus info: my web page is now reeeeeally slow for some users - but only for some. It's not browser dependend. And I don't know why).
 
Old 09-24-2012, 01:59 AM   #2
lenka
LQ Newbie
 
Registered: Sep 2012
Location: Denmark
Distribution: Ubuntu something (11 I think - upgrading to 12 soon)
Posts: 17

Original Poster
Rep: Reputation: Disabled
I also seem to get this error in my error-log:

Quote:
[Mon Sep 24 08:58:11 2012] [error] [client 62.242.0.66] PHP Notice: Constant USE_SHUTDOWN already defined in /var/www/***/init.php on line 153
[Mon Sep 24 08:58:11 2012] [error] [client 62.242.0.66] PHP Notice: Constant KERNEL_PATH already defined in /var/www/***/init.php on line 160
Can this have anything to do with my internal server error when safe mode is on?
 
Old 09-24-2012, 03:40 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
It is better when safe mode is off. It is also deprecated on new php versions. It not give good security, but unnecessary limit what php programmers can do. Better is using good configuration and buitin Linux security technics, which anyway must be implemented on good public servers. For example users/programmers can get problems when uploading files by ftp and then trying to access it by php script - and common solution was chmod files and directories to 777, which is even less secure. Here you have full list of functions affected by safe mode.

These notices about already defined constants should not impact performance or safe mode. Safe mode affect "connection" between php scripts and filesystem.

You should post exactly what error you get when safe mode was enabled to get answer on your bonus question. Slow web pages for only some users indicate to baddly written scripts or sql server low performance (by bad queries or just to low resources). Too low details to conclude something more. You should check logs of sql server, mysql has something like slow queries log (it need to be enabled) and some other.

Last edited by eSelix; 09-24-2012 at 03:53 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
safe mode sosa52 Linux - Newbie 3 08-27-2012 01:29 PM
Curiosity about Terminal use... (and Bonus question ;-) about apt-get and aptitude) Amdx2_x64 Linux - General 5 11-01-2010 08:07 AM
How to set virtual IPs on startup (and a super bonus question!) diggs Linux - Networking 10 06-25-2008 02:04 PM
safe mode elmorgo Linux - Software 1 08-30-2004 07:04 AM
safe mode firedragon Linux - Newbie 2 04-03-2004 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration