Shrinath
Shrinath

Reputation: 8118

Case sensitivity in URL issue on Linux + NGinx + Kohana + php

There is an issue/bug/feature/whatever on Linux + NGinx + Kohana :

We have to make sure that we keep all our file names in lowercase only.

We can't have anything like "setUserServer.php". It simply doesn't work. No idea why. If we give the name of the same file as "setuserserver.php", it runs.

This problem doesn't exist on Windows + Apache + Kohana.

If anyone has an idea how to solve this, please do chime in this thread.

Thanks.

Upvotes: 5

Views: 1230

Answers (3)

test30
test30

Reputation: 3654

I know it's old, however like me, some people maintaining old systems might find this usetul.

You could also be using composer's autoloader (here more Composer with Koseven (Kohana))

(Note that it's not that obvious how to use both).

Another option would be getting rid of strtolower in kohana/core.php, however this will imply other inconsistencies.

I think it's the best to rely on composer's autoloader if you can change your setup to do so.

Upvotes: 0

biakaveron
biakaveron

Reputation: 5483

You can use mixed case for a vendor libraries (loading by include or require), but original Kohana's autoloader will convert class names to lower case (as SpadXIII). So, possible solution is writing your own autoloader (or extend Kohana class) and use it instead/before standard.

PS. AFAIR, View class will work with files like PageTemplate.php

Upvotes: 0

SpadXIII
SpadXIII

Reputation: 916

Solution is sticking to the naming scheme of kohana: all files lower case

Windows by default is not case sensitive, and linux is. Can't "solve" that

Upvotes: 6

Related Questions