Another My_Controller not found problem ... but this one is a bit different ! - 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: Another My_Controller not found problem ... but this one is a bit different ! (/showthread.php?tid=30102) |
Another My_Controller not found problem ... but this one is a bit different ! - El Forum - 05-03-2010 [eluser]Monarobase[/eluser] Hello, I've been pulling my hair out trying to find a solution for this one so I thought I would ask you for some advice ! I've extended the controller class with MY_Controller and it works fine on MAMP but when I run it on my production server MY_Controller doesn't seem to get loaded ! Codeigniter version : 1.7.2 Error : Code: Fatal error: Class 'My_Controller' not found in ... line 3 File : application/libraries/MY_Controller.php File Contents : Code: <?php Controller contents : Code: <?php MAMP PHP version : 5.2.11 PRODUCTION SERVER PHP version : 5.2.11 The files are identical, I uploaded a zip file containing all the files and unzipped it to make sure none were lost during FTP upload... Any advice would be most appreciated ! Another My_Controller not found problem ... but this one is a bit different ! - El Forum - 05-03-2010 [eluser]jedd[/eluser] Hi Monarobase - this is described in lurid detail in [url="/wiki/MY_Controller"]the wiki[/url], as well as the [url="/wiki/FAQ"]FAQ section[/url] of same. Typically the biggest problem people have when moving between platforms is case-sensitivity. This line from your message is a giveaway: [quote author="Monarobase" date="1272921923"] Error : Code: Fatal error: Class 'My_Controller' not found in ... line 3 The fact that it's looking for 'My' rather than 'MY' means that you've got a typo somewhere, or you've misnamed your file. It looks like your file is named properly .. so ... Another My_Controller not found problem ... but this one is a bit different ! - El Forum - 05-03-2010 [eluser]Monarobase[/eluser] Wow I do feel stupid about that one ! Thanks for saving me alot of time ! There I was thinking I had something complex to deal with ! I took it for granted that because Mac OS is Unix based MAMP's PHP would be case sensitive just like on my server ! Had I been working on a Windows machine it would have been one of the first things I would have checked as my very first headache in HTML (about 11 years ago) was caused by case sensitivity ! Another My_Controller not found problem ... but this one is a bit different ! - El Forum - 05-03-2010 [eluser]jedd[/eluser] [quote author="Monarobase" date="1272928277"] Thanks for saving me alot of time ! [/quote] The wiki is your friend. Quote:I took it for granted that because Mac OS is Unix based MAMP's PHP would be case sensitive just like on my server ! Had I been working on a Windows machine it would have been one of the first things I would have checked as my very first headache in HTML (about 11 years ago) was caused by case sensitivity ! It's a file system thing, rather than an OS thing. I think with modern OSX versions you get the choice of four file systems - two of which are case sensitive, two aren't. The two that aren't still respect (retain) case - much like NTFS and VFAT do - they just ignore it. Another My_Controller not found problem ... but this one is a bit different ! - El Forum - 05-10-2011 [eluser]Steve Wanless[/eluser] I just joined the stupid club also. Testing on my production server I ran into the same problem and spent far too long trying to figure out what was wrong. In a last ditch effort (before I planned on posting to the forum) I decided to google the exact problem I was having; "codeigniter my_controller works on XAMPP but not my production server" And what do ya know, I found this post. |