# Disallow PHP in certain directories?

**URL:** <https://forum.kirupa.com/t/disallow-php-in-certain-directories/94434>\
**Category:** Uncategorized\
**Created:** [November 12, 2003, 4:58pm UTC](https://forum.kirupa.com/t/disallow-php-in-certain-directories/94434 "2003-11-12T16:58:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![corvettekenny](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@corvettekenny](https://forum.kirupa.com/u/corvettekenny)\
**Post date:** [November 12, 2003, 4:58pm UTC](https://forum.kirupa.com/t/disallow-php-in-certain-directories/94434/1 "2003-11-12T16:58:57Z")

</div>

I’ve been working on setting up a web server to host pages for friends, and hopefully a few businesses eventually. I’ve been using PHP for a while, and I have a web-based front end for people to upload files and such which relies on the filesystem commands (fopen, readfile, etc.)… I don’t want any user on my webserver having access to the filesystem commands, for the obvious reasons… I can disable the file commands using the php.ini file, but then my front end would no longer work. The best solution I can come up with is running two seperate servers: one with full php commands enabled which runs the front end, and one with limited php enabled which serves up the user directories.

There has to be a simpler solution… Is there any way I can specify a limited set of php commands for the user folders? Or, can I totally disable PHP commands for the user folders?

And a side note, I’m running something called sambar server ([www.sambar.com](http://www.sambar.com)) … I’m hesitant to switch to IIS , because I’m not too good at keeping up on hotfixes, but if I do, will that offer me a solution to this prob?

Thanks a lot! :azn: Kenny
