Tag Archives: case sensitive

Multi-plataform development notes

If you have a Windows box to develop web applications and then, for production and quality, uses Unix / Linux box you should know that there are some little things that you should take care of. No need to mention the fact that on Unix / Linux everything is case sensitive and on not on Windows (even knowing that Apache threats everything as case sensitive on Windows) is the number one thing that can break if you are migrating from Windows to Unix / Linux, but there are some functions that might work differently and break if you don’t take a more chirurgical look.

For a smart and small example take a look on the mkdir function from php. All you need to do is enter the path, writing mode (chmode) and if is recursive. On a Windows box if you enter something like mkdir($path,’0777’,true) or mkdir($path,0700,true) it will create the folders in the path but will as well set them as writable, even if you said not to, but on Unix and Linux that would not work.

Take a look on the first function, mkdir ( $path , ‘0777’ , true );

If you set your script to create the folder path like this in a UNIX box, it will be created, but the permissions will be wrong. The second argument for the function is an integer and not a string, therefore the permissions would not be created correctly and if you tried to upload a file to the directory, it would fail on permission denied. On a Windows box this is totally bypassed.

Another thing to consider is the way that Windows creates the path. If you use something like c:\path\to\root it will fail on a UNIX or Linux box. To avoid this you need simply change the back slash for the forward slash (c:/path/to/root). This will work on both platforms’.

Small cares like this can make your life way easier while developing in PHP.

Have fun.


Case sensitive passwords

No matter where you are registering you will find 2 distincts password handling systems:

  • Case sensitive password storage
  • Case insensitive password storage

If you work in a LAMP enviroment most likely you will use a case sensitive method, since that’s what you are used to (Linux is a case sensitive system) and most likely you have set on your brain that this is the only secure accepted scenario for password handling, but when you start looking for the user side, case sensitive password handlers became an issue.

Talking with some users (none computer savy) I found out that a password with upper case letters, lower case letters, special chars and numbers combination is a little too much to remember.

Considering this and my will of testing out the poll system from WordPress, I would like to you guys to help me out.

I’m pretty strict with security and I would not exchange security for usability in a password system, but I would like to know what you guys think, so…

%d bloggers like this: