View Full Version : PHP Safemode For Subdirectories
ZendURL
03-15-2006, 02:04 PM
Is there anyway (preferably using .htaccess) to put php into safemode for all subdirectories (although not the root folder).
Also would this be enough to secure my website from hackers?
Also, since I am testing on a shared hosting package, there is no .htaccess file. Is there any way to get a .htaccess file onto my shared server?
Thanks! :)
jcink
04-05-2006, 05:09 PM
I know the date is old but if you're still having trouble or you used this method:
Are you saying you're using shared hosting and you host your users in their own folder on the shared host? Using htaccess to turn on safe mode in the folders wouldn't be safe enough, because people can do "../../" still in PHP and go above their folders. This is provided that your shared provider doesnt have open_basedir on. I mean, sure, permissions can be set, but still... some forums/scripts require stuff to be 777 so those users can get easily hacked.
I think.
ZendURL
04-05-2006, 08:26 PM
I am using a shared host, and I can host users in a subdirectory/folder on my domain name (hosted under my shared host).
I am required to have 777 permissions for the script to work. My script also utilizes url_fopen, so it is hard to set up any safety precautions.
jcink
04-05-2006, 10:16 PM
[code removed]
ZendURL
04-05-2006, 11:03 PM
I put in the code and it gave me every folder and file that is on the main site (not in any subdirectories.)
So I know I am at risk... what do I do now (since I need those 777 permissions)
jcink
04-06-2006, 12:18 AM
oof.
Removed code so nobody reading this uses it on you.
Um. You need to talk to your hosting provider. You can't fix it from your end. PMed you with exact details to keep it off this board
vBulletin® v3.6.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.