Welcome Guest, Not a member yet? Register   Sign In
Windows code not working on linux? [RESOLVED]
#1

[eluser]amw_drizz[/eluser]
Hello All,

My problem is when I upload my site to my host for more testing it breaks. I am getting this error
Code:
Unable to load the requested class: site_sentry
It has to do with the Linux / windows Naming scheme.

Now all my files are using CI suggested naming scheme, and it fails on *nix and works on windows? WTF?

Anyways hosting specs both local and remote
Local
Apache 2.2
PHP 5.2.9
MySQL 5.2
XAMP Base

Remote
Apache 1.3
PHP 5.2.x
MySQL 5.2

I know Linux is touchy with file names thus is why I tried to be consistent with CI suggestions.

I am trying to make my APP Cross Platform to be used on both Windows And Linux Servers (running Apache only no IIS)

Thanks for any suggestions

EDIT :: Food for thought
In windows you need the class files like so Class.php yet on linux it is class.php?

I am loading my Classes with it like Class.php it switches it to lower case causing it not to load on linux....
#2

[eluser]jedd[/eluser]
[quote author="amw_drizz" date="1248996306"]
I know Linux is touchy with file names thus is why I tried to be consistent with CI suggestions. [/quote]

People often say this as though it's true.

*nix respects and distinguishes case. NTFS (rather than 'Windows') respects but ignores case.

This means that if you copy a file called 'Foo.php' onto NTFS it'll retain that name for the life of the file, but you can refer to it by 'foo.php' or 'FOO.PHP' and so on.

Quote:In windows you need the class files like so Class.php yet on linux it is class.php?

I think you are confused here.

Filenames are lower case. Read the CI User Guide if you don't believe me.

You refer to the Class using a ucfirst() format, but that is a PHP thing and consequently works consistently across any platform (W32, *nix, etc).
#3

[eluser]amw_drizz[/eluser]
Yea after some trial and error, I got it fixed, I just needed verification.

But all my file names are now lowercase.
#4

[eluser]wiredesignz[/eluser]
CI Library file names are ucfirst() all other filenames are lowercase. Read the CI User Guide if you don’t believe me.

Or just look at the CI system files.
#5

[eluser]jedd[/eluser]
[quote author="wiredesignz" date="1249033325"]CI Library file names are ucfirst() all other filenames are lowercase. Read the CI User Guide if you don’t believe me.[/quote]

Hey wiredesignz - still not getting enough sleep, eh?

Anyhoo, I was rather foolishly limiting my discussion to models and controllers.

Library files are a bizarre exception to an otherwise straightforward standard - and do not follow either your or my claim (consider 'MY_Controller') of ucfirst-ness.

Look in your application/libraries directory if you .. oh, never mind.
#6

[eluser]wiredesignz[/eluser]
"MY_" is the subclass prefix and is able to be altered as the developer wishes, It's not really relevant to this discussion. Neither is your comment about sleep deprivation.
#7

[eluser]jedd[/eluser]
Oh, I didn't realise that you had implemented a one-way filter on sarcasm.

Humble apologies.
#8

[eluser]wiredesignz[/eluser]
MY_Sarcasm is indirectly proportional to your accuracy.




Theme © iAndrew 2016 - Forum software by © MyBB