Welcome Guest, Not a member yet? Register   Sign In
Extending core class fails on live serve.
#1

[eluser]CloppiWeb[/eluser]
Hi everybody!

So, my problem. I'v defined in config.php file the sub class prefix to "As_". In library folder I have file called As_session.php which contains declaration class As_session extends CI_Session.

While running mamp locally it runs smoothly but yesterday evening I uploaded the project to live server (I believe it runs PHP 5+) and it seems my sub class does not get loaded at all.

If I but die() command in to the constructor of my subclass (As_session()) I see that it get's not loaded because the application loads as usual.

Any ideas?
#2

[eluser]jedd[/eluser]
[quote author="CloppiWeb" date="1275839384"]
So, my problem. I'v defined in config.php file the sub class prefix to "As_". In library folder I have file called As_session.php which contains declaration class As_session extends CI_Session.
[/quote]

It is likely (but not guaranteed) related to a case sensitivity issue (or lack of) on one of your platforms, that is hiding the weird mixed-case nature of your prefix. This is touched upon within the [url="/wiki/FAQ"]FAQ[/url], though your specific variant of the problem is not.

You've said that you have a library file called As_session.php whereas the file should be As_Session.php - as per the [url="/user_guide/general/core_classes.html"]User Guide section on Core Classes[/url] - specifically the section 'Extending Core Classes'.

I'm guessing that you've moved onto a Real Operating System in your production environment, and that your MAMP system is running on a case-insensitive file system.
#3

[eluser]CloppiWeb[/eluser]
Yeah, I kind had weird feeling that it had something to do with a typo or something else. Cheers bro, I'm running like a 20 files custom library and did not notice that session class was with non-capitalized first letter.

Problem solvet immediately when I made that change...god damn Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB