CodeIgniter Forums
Moved CI project from Mac to Linux - now broken - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Moved CI project from Mac to Linux - now broken (/showthread.php?tid=18901)

Pages: 1 2


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]shankec[/eluser]
I've moved an app from Mac to Linux and after a lot of haranguing I figured out that Linux isn't happy because i capitalized the first letter of each of my class files. Since this is a new Linux server (8.04LTS) I'm wondering if there is an apache module being loaded that is causing this to happen. I don't really want to rename all my files.


any help is appreciated.


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]Dam1an[/eluser]
Sorry, but not as far as I know... Linux is case sensitive
What i don't get is, both Mac and Linux are UNIX based, so I'd have assumed Mac would be case sensitive as well

You could probably use a bit of command line wizardry using a for loop and sed to convert all your files to lower case (but no libraries)


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]shankec[/eluser]
that's the weird thing - the mac is case sensitive. the linux system seems to be forcing lower case in requests, and then failing to find pages that have proper capitalization. i think this may also be a problem with the CI libraries too - so I prefer to have linux stop doing this.

thanks


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]TheFuzzy0ne[/eluser]
Why not write a quick script that will do the conversions for you?


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]shankec[/eluser]
i just seems like i should fix my linux server. what happens when i want to get an update from CI?


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]johnwbaxter[/eluser]
Get an xserve to replace your linux machine. There, problem solved.


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]shankec[/eluser]
nice. i guess i'm just going to get smart-ass remarks here.


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]shankec[/eluser]
Ok - it seems lower-case file names are a requirement with CI. I just didn't realize this. The mac was hiding this requirement from me. Their filesystem must be case-insensitive to some degree.

from here: http://www.developertutorials.com/tutorials/php/rapid-application-development-with-codeigniter-8-02-17/page4.html

"Just a note on CodeIgniter naming conventions: all file names are lower case, all class names start with an uppercase letter and are in files of the same name (plus the .php extension). CodeIgniter does alter the capitalization of names you pass to it, so under_scores are used as opposed to StudlyCaps or camelCase."


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]johnwbaxter[/eluser]
Ah sorry, my bad. I would never have come across this as my class and function names are always lower case. It's just the way i do things as i know that capitalisation is an issue between windoze and linux. In the same way, i always name files in windows with underscores instead of spaces. It simply means that there will never be a problem on any OS.

Sorry for my unhelpful post.


Moved CI project from Mac to Linux - now broken - El Forum - 05-21-2009

[eluser]shankec[/eluser]
yeah - it's weird. i would have expected the uppercase to be an issue on the mac too - but i guess it's the filesystem working it's case insensitive magic.

So i changed the case on my files - not a big deal there weren't that many. however - next weirdness is my template is not being rendered as php - it's literally spitting out the php tags inside the rendered file. so the php processor is being weird.

more digging i guess. thanks for the help though, i do appreciate it.