943,884 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 12622
  • PHP RSS
Nov 20th, 2003
0

PHP safe_mode & effects of turning it off...

Expand Post »
My question/issue is that I want to turn off PHP safe_mode on a new server... The server is running Ensim 3.5 Pro, and this is the 3rd ensim server I have from ev1servers.com...

The server is completely dedicated, and will NEVER host anyones site/sites but my own for a project among 4 partners.

I've turned off safe_mode for an entire server before, but have never really looked into the affects of this, and the potential problems this might cause.

According to http://us3.php.net/features.safe-mode, "The PHP safe mode is an attempt to solve the shared-server security problem. It is architecturally incorrect to try to solve this problem at the PHP level, but since the alternatives at the web server and OS levels aren't very realistic, many people, especially ISP's, use safe mode for now. "

To me, this sounds like using PHP safe mode is really only an issue for a Web Server running PHP with more than one user accessing the server, or running scripts on the server.

I know how to turn it off just by changing the httpd.conf from:
PHP Syntax (Toggle Plain Text)
  1. <IfDefine vwh_php4_module>
  2. php_admin_flag safe_mode on
  3. </IfDefine>
to
PHP Syntax (Toggle Plain Text)
  1. <IfDefine vwh_php4_module>
  2. php_admin_flag safe_mode off
  3. </IfDefine>
Can anyone think of any reasons this would EVER be an issue on a server that no one accessed, or ran scripts on other than myself/my partners???

I'm sure this could cause some debate, but I want opinions!!!!
Similar Threads
Reputation Points: 11
Solved Threads: 0
Junior Poster in Training
himerus is offline Offline
82 posts
since Aug 2003
Nov 20th, 2003
0

Re: PHP safe_mode & effects of turning it off...

Unless your site is going to be public, I dont see any problem with it.

If it is open to the public then potential hacks could manipulate scripts on your site.. for example

[script on my site]
<?php
$file = fopen("http://www.yoursite.com/thescript.php","w+");
unlink($file);
fclose($file);
?>
[/script on my site]

Someting like that.. :o
Neo
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Neo is offline Offline
4 posts
since Nov 2003
Nov 23rd, 2003
0

Re: PHP safe_mode & effects of turning it off...

I've tried running a script sort of like the one you have posted, NEO, and I haven't been able to make it work...

I've ran it from several different servers, and pointed it to scripts on servers with safe mode on, and off.

I'd be interested to find a way to make sure it wasn't working, but from all my tests, I couldn't write to a file on any of my servers, and the default file properties only give write access to the owner, so with Apache running as nobody, it makes sense that it wouldn't work...

Any other thoughts/suggestions?!
Reputation Points: 11
Solved Threads: 0
Junior Poster in Training
himerus is offline Offline
82 posts
since Aug 2003
Jul 21st, 2006
0

Re: PHP safe_mode & effects of turning it off...

Don't be silly that'd never work.
Reputation Points: 10
Solved Threads: 0
Light Poster
vartotojas is offline Offline
29 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Getting info from an XML file
Next Thread in PHP Forum Timeline: php5, mysql and IIS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC