Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I develop PHP on a Mac, and OS X (HFS+) is case insensitive when it comes to file and folder names. This can cause issues with auto-loading PHP classes, because it uses the class name to search for files.

It becomes an an obnoxious problem when case typos in my code can make it all the way through a development cycle, and only rear their ugly head when I start deploying to our (linux) production server.

Does anyone know a of a solution that will force OS X to obey case sensitivity while developing PHP?


share|improve this question
up vote 2 down vote accepted

Personally, I think the best solution would be for you to setup a Virtual machine, using whatever you favorite VM tool is, that is as near to identical to your production environment as possible. Same OS, same packages, same configuration and so on.

You are bound to run into other issues as well like slight differences in php, difference in available modules, and so on. A VM that is the same as your production environment will help you be sure you have everything tested right.

Anyway, if a VM isn't an option, you should be able to partition the drive, and create a separate partition using the case-sensitive version of HFS+

share|improve this answer

You can format your development volume to be HFS case sensitive which will force the behavior you wish. Downside of this is some poorly written OS X applications won't work because developers have made the same mistake you have and mis-capitalized paths.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.