• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter not extending Image_lib [SOLVED]

I have extended the core Image_lib with 2 methods, one new, one overriding a core method.

So, in my application/libraries folder, I have a file "My_Image_lib.php", which extends the library as follows:

class My_Image_lib extends CI_Image_lib
    function resize_and_crop()
        // Some code here
    function image_reproportion()
        // Some other code here

This works beautifully locally (running on WAMP 2.1), but when I upload it to my server (I'm using siteground), I get the following error:

Fatal error: Call to undefined method CI_Image_lib::resize_and_crop() in /..whatever../application/models/process_image_model.php on line 26

It seems that Codeigniter is simply not loading my class that's extending the main one.
To verify, I tried:
and it did not list my resize_and_crop method.

I thought I might have uploaded it wrong, but I've now gone ahead and deleted everything from the remote server, and re-uploaded it all.
To no avail.

Any help would be greatly appreciated.

SOLVED: Sorry for this. It was simply because I started my class/file names with "My" instead of "MY".
Although I have no idea why it worked locally.

It worked locally because windows is case-insensitive, linux is not.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.