hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : How many host use safe mode & open base dir?
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

How many host use safe mode & open base dir?

View Poll Results: Do you use safe mode php on your server?
Yes! 14 66.67%
No! 7 33.33%
Voters: 21. You may not vote on this poll

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-20-2002, 05:13 AM
MultiVol MultiVol is offline
WHT Addict
 
Join Date: Aug 2002
Posts: 136
Question

How many host use safe mode & open base dir?


Above ^

__________________
Western Man

Reply With Quote


Sponsored Links
  #2  
Old 09-20-2002, 06:34 AM
priyadi priyadi is offline
Registered User
 
Join Date: Apr 2001
Location: Depok, Indonesia
Posts: 986
No. We use CGI mode PHP, suexec wrapped. No need for safe mode.

Reply With Quote
  #3  
Old 09-20-2002, 07:17 AM
MultiVol MultiVol is offline
WHT Addict
 
Join Date: Aug 2002
Posts: 136
Like to explain how its done please and is there a down side on your way?

__________________
Western Man

Reply With Quote
Sponsored Links
  #4  
Old 09-20-2002, 08:07 AM
Alan - Vox Alan - Vox is offline
Web Hosting Master
 
Join Date: Nov 2000
Location: Dundee, UK
Posts: 1,366
having php run as cgi is much slower.

Reply With Quote
  #5  
Old 09-20-2002, 08:16 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
I have it enabled except on my own sites... but that's usually only because I have server monitoring scripts which require access to files outside the document root.

Reply With Quote
  #6  
Old 09-20-2002, 08:45 AM
MultiVol MultiVol is offline
WHT Addict
 
Join Date: Aug 2002
Posts: 136
I wish i could not use safe mode but wouldnt know how to do any other methods.

__________________
Western Man

Reply With Quote
  #7  
Old 09-20-2002, 02:08 PM
priyadi priyadi is offline
Registered User
 
Join Date: Apr 2001
Location: Depok, Indonesia
Posts: 986
Try this thread: http://www.webhostingtalk.com/showth...&pagenumber=1.

As for speed issues, PHP under CGI mode is surely slower than PHP running under Apache module. But the speed is still acceptable. It is a small expense for much better security and flexibility (no safe mode hassles).

Reply With Quote
  #8  
Old 09-21-2002, 02:19 AM
JustinH JustinH is offline
Web Hosting Master
 
Join Date: Nov 2000
Posts: 3,042
It's not just a speed factor (which when you talking about larger programs the speed ratio gets VERY wide), but also higher system resource usage.

Furthermore, most scripts in PHP are intended for mod_php and therefore some simply won't function under CGI without some code modification.

However, safe mode is a royal pain in the butt as well. It causes limitations on some of the nifty features of PHP (that don't neccesarily cause problems). My suggestion: set open_basedir to the users top directory (/home/user/) and none of the file-system functions will be able to be performed outside of that directory.

Heck of a lot easier then safe mode OR running PHP under CGI.

__________________
A well-reasoned assumption is very close to fact.
- Adorno


Reply With Quote
  #9  
Old 09-21-2002, 03:57 AM
priyadi priyadi is offline
Registered User
 
Join Date: Apr 2001
Location: Depok, Indonesia
Posts: 986
Quote:
Originally posted by comphosting
It's not just a speed factor (which when you talking about larger programs the speed ratio gets VERY wide), but also higher system resource usage.
Yes, however scripts other than PHP has been doing this for years. Otherwise, we need to use mod_perl, mod_python and mod_dtcl as well.

Quote:

Furthermore, most scripts in PHP are intended for mod_php and therefore some simply won't function under CGI without some code modification.
To my experience, most PHP scripts are running just fine under CGI mode. In fact I don't know any specific script that requires it running under apache module. Most of our clients don't even notice their PHP scripts are running under CGI mode.

Quote:

However, safe mode is a royal pain in the butt as well. It causes limitations on some of the nifty features of PHP (that don't neccesarily cause problems). My suggestion: set open_basedir to the users top directory (/home/user/) and none of the file-system functions will be able to be performed outside of that directory.
Not enabling safe mode will allow users to execute arbitrary programs under Apache uid/gid (using exec, passthru, etc). Which in turn it is still possible for a malicious user to read other users sensitive data. open_basedir only impose limitation on opening files, not executing them.

Reply With Quote
  #10  
Old 09-21-2002, 04:50 AM
JustinH JustinH is offline
Web Hosting Master
 
Join Date: Nov 2000
Posts: 3,042
hmm... though I've never tried to screw around with screwing around I didn't realize that open_basedir didn't limit system commands. Learn something new everyday .

__________________
A well-reasoned assumption is very close to fact.
- Adorno


Reply With Quote
  #11  
Old 09-22-2002, 10:56 PM
magnafix magnafix is offline
Web Hosting Master
 
Join Date: Apr 2001
Location: Montana USA
Posts: 673
cgi mode is not slower than module mode -- IF you only enable the modules you're using. That's why we give our (chrooted, suexec'd PHP) customers their own php.ini with a web interface to enable the extensions they need. If you enable every optional extension available on the server, yes it's a dog. But enable MySQL, PCRE, and one or two more, and it's speedy.

__________________
John Masterson
Former Hosting Company Owner

Reply With Quote
  #12  
Old 09-24-2002, 12:58 AM
jstanden jstanden is offline
Web Hosting Evangelist
 
Join Date: Aug 2001
Location: Orange County, CA
Posts: 532
We're using Plesk and can modify or disable some of the safe_mode restrictions & features (base_dir, etc) in vhost.conf files on a per-site basis.

As a general rule, safe-mode is enabled on every shared hosting server we run. If your shared hosting clients need more flexability, they probably need a dedicated box or upgraded hosting plan (VDS/etc)

__________________
Jeff Standen, Chief of R&D, WebGroup Media LLC. - LinkedIn
Cerberus Helpdesk 5.x (Cerb5) is a CRM toolkit. Remember anything about anybody, swiftly reply to a flood of e-mail,
capture feedback organically, track time, flag opportunities, share tasks, and more. http://www.cerberusweb.com/

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host PeakColo Releases PaaS Based on Uhuru Software Technology Web Hosting News 2012-09-25 15:06:34
Web Host Endurance to Offer Open-Xchange Email Services to Customers Web Hosting News 2012-05-30 13:49:44
Spanish Web Host Acens Partners with Open-Xchange Web Hosting News 2011-09-08 15:55:41
Can you use your own judgment in DMCA matters? Blog 2011-08-05 20:30:35
Web Host Nexcess Achieves US Safe Harbor Certification Web Hosting News 2011-06-10 13:10:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?