Solved

Apache Mac Case Sensitivity

Posted on 2009-07-03
7
562 Views
Last Modified: 2012-05-07
I have a Mac running Apache (Default Zend Server Setup) and a AptanaCloud Site (*NIX virtual host).

I thought all Unix based systems were case sensitive, however my Mac doesn't seam to mind on PHP includes but Aptana does. This is quite  bore as I when I move my projects from the local server to remote they often don't work because of folder names.

I use the Zend_Autoloader to load my external PHP classes which uses the pattern Folder/Folder/Class.php for Folder_Folder_Class... However there are some custom paths like a folder called models takes classes mapped as Model_. So sometimes the folder has to be lower case and sometimes upper depending on whether it is registered in the Autoloader.
0
Comment
Question by:stmayes
  • 3
  • 3
7 Comments
 
LVL 1

Accepted Solution

by:
scott_whitlow earned 500 total points
Comment Utility
Yes, Mac's are not case sensitive. If you make a directory called "test" and then immediately try and make a directory called "TEST" it will give you an error.

You probably want to come up with a naming convention for your folders and files anyway. This is just good programming practice.

This is a good place to start:
http://en.wikipedia.org/wiki/Identifier_naming_convention
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
OS X 10.x uses case sensitive HFS by default, unless you changed it due to re-installation or use of disk system utility.
If you changed it to case-insensitive there is no way for any program to use case-sensitive files or directories. You need to ensure unique names youself.
0
 

Author Comment

by:stmayes
Comment Utility
My file system seams to be case-sensitive but Apache doesn't.

Re: naming convention, I do have a convention in place but my Zend Autoloader is trying to be too helpful by allowing me to put this like Module_Form_Class in a folder called module/forms/Class.php.. (note the plural folder name). For folders not registered in the Autoloader I have to use the same as the class name eg. Module_Connector_Class is mapped to Module_Connector_Class...

My problem is that Apache finds the files/ folders regardless of case, whereas my server is a little more picky.

Can anyone help me find an option to make Apache more strict???
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
do you use mod_spelling? check your config files for CheckSpelling directive
or do you have RewriteRule which match case insensitive
0
 

Author Comment

by:stmayes
Comment Utility
No rewrite rule. Just checked all config files. No reference to Mod_Spelling or CheckSpelling... Thanks for the tip though...
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
case sensitive filesystem, and no case sensitive configuration for apache; that sound strange, very strange.
Are you really talking about URLs handled by apache? and not URLs handled by a module (like php, perl, mod_jk, ...)
0
 

Author Comment

by:stmayes
Comment Utility
I fairly certain it's Apache. I'm using Zend_Application_Module_Autoloader (from the Zend Framework) to do my PHP includes. I guess it could be PHP. The two PHP versions are identical as is the source code. The only difference is Mac and Linux.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now