[Solved] Not load library in server, only in my notebook (localhost) - 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: [Solved] Not load library in server, only in my notebook (localhost) (/showthread.php?tid=36709) |
[Solved] Not load library in server, only in my notebook (localhost) - El Forum - 12-12-2010 [eluser]Patrick Maciel | @p4designer[/eluser] Hi everbody. (Sorry about my english, I'm brazilian) I have a little problem. Autoload: Code: $autoload['libraries'] = array('currentmenu'); Library (CurrentMenu) - directory: libraries/CurrentMenu.php. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Here, I call/load the library: Code: function index() { But, appear this message (only in server, not in my notebook [localhost]): Code: An Error Was Encountered What's the problem? I no have idea :-S Help me please! So... thanks so much [Solved] Not load library in server, only in my notebook (localhost) - El Forum - 12-12-2010 [eluser]Cesar Kohl[/eluser] This is unusual. Is there a duplicate name for 'currentmenu'? I had some months ago the same problem but in both, local and remote, servers and the problem was two duplicate names conflicting. [Solved] Not load library in server, only in my notebook (localhost) - El Forum - 12-12-2010 [eluser]Patrick Maciel | @p4designer[/eluser] Ya, ok.... but: where the duplicate name in the adove the code? I dont know my friend :-S [Solved] Not load library in server, only in my notebook (localhost) - El Forum - 12-12-2010 [eluser]Patrick Maciel | @p4designer[/eluser] I found a solution! I think for load the library you need write name in "lower case", but, NOT! When I change the autload.php for: Code: // Now works :) So.... to load a library in CodeIgniter 1.7.2, you must enter the library name like the name of the class - class NameHere - "capitalize." BUT... for use the library functions you need write library name in lower case. Code: $this->currentmenu->seAtual("home", "home", "current"); Observations: In my note (localhost), PHP version is 5.3.1, and in server/host is 5.2.6. I guess it was not the problem but not sure. Why, anyway, on my laptop works the "autoload" in "lower case" but not on the server. I hope I have helped someone with this. now, grateful for the support. [Solved] Not load library in server, only in my notebook (localhost) - El Forum - 12-13-2010 [eluser]gyo[/eluser] Just guessing... it could be that you have Windows on your laptop (not case sensitive), and Linux on the server (case sensitive). [Solved] Not load library in server, only in my notebook (localhost) - El Forum - 12-13-2010 [eluser]Patrick Maciel | @p4designer[/eluser] [quote author="gyo / suashi" date="1292277912"]Just guessing... it could be that you have Windows on your laptop (not case sensitive), and Linux on the server (case sensitive).[/quote] Oh,I dont know O_O. Thanks so much my friend I just use in 'lower case' because in User Guide it's in 'lower case', but ok. Thanks my friend |