EagerWolf Posted March 25, 2008 Share Posted March 25, 2008 Hello! I have tried to restrict access using PHP.ini - openbase_dir... I have archived, that php was executed only in certain directory. So let's say we have got index.php with path: "C:/Web/www/"... I set openbase_dir = "C:/Web/www/" Fine index.php was accessible and worked fine. I tried to run another file in "C:/Web/www/dir1/" and file didn't execute. Perfect! But when I tried to include file in dir1 into index.php I got error... Thanks for your help! Matija Quote Link to comment https://forums.phpfreaks.com/topic/97870-solved-phpini-amp-access-restriction/ Share on other sites More sharing options...
MadTechie Posted March 26, 2008 Share Posted March 26, 2008 sounds like its working correctly to me! whats the problem ? Quote Link to comment https://forums.phpfreaks.com/topic/97870-solved-phpini-amp-access-restriction/#findComment-500856 Share on other sites More sharing options...
wildteen88 Posted March 26, 2008 Share Posted March 26, 2008 I set openbase_dir = "C:/Web/www/" When using openbase_dir dont end paths with slashes. Use: openbase_dir = "C:/Web/www" This will allow PHP to parse php files in C:/Web/www and all subdirectories. if you set openbase_dir it to C:/Web/www/ (forwardslash at the end) you only allow access files contained in C:/Web/www it wont parse files in subdirectories. Quote Link to comment https://forums.phpfreaks.com/topic/97870-solved-phpini-amp-access-restriction/#findComment-501145 Share on other sites More sharing options...
EagerWolf Posted April 19, 2008 Author Share Posted April 19, 2008 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/97870-solved-phpini-amp-access-restriction/#findComment-521442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.