
09-20-2002, 05:13 AM
|
|
WHT Addict
|
|
Join Date: Aug 2002
Posts: 136
|
|
How many host use safe mode & open base dir?
__________________
Western Man
|

09-20-2002, 06:34 AM
|
|
Registered User
|
|
Join Date: Apr 2001
Location: Depok, Indonesia
Posts: 986
|
|
No. We use CGI mode PHP, suexec wrapped. No need for safe mode.
|

09-20-2002, 07:17 AM
|
|
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
|

09-20-2002, 08:07 AM
|
|
Web Hosting Master
|
|
Join Date: Nov 2000
Location: Dundee, UK
Posts: 1,366
|
|
having php run as cgi is much slower.
|

09-20-2002, 08:16 AM
|
|
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.
|

09-20-2002, 08:45 AM
|
|
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
|

09-20-2002, 02:08 PM
|
|
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).
|

09-21-2002, 02:19 AM
|
|
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
|

09-21-2002, 03:57 AM
|
|
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.
|

09-21-2002, 04:50 AM
|
|
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
|

09-22-2002, 10:56 PM
|
|
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
|

09-24-2002, 12:58 AM
|
|
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/
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| 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
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|