![]() |
500 Server when load model - 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: 500 Server when load model (/showthread.php?tid=39130) |
500 Server when load model - El Forum - 03-01-2011 [eluser]drseuss[/eluser] Hi... Every time I run the page, and it gets to loading the login_model I get a 500 internal server error... and when I comment out the load->model it doesn't error. here are the pages login.php - controller Code: class Login extends CI_Controller { login_model.php - model Code: class Login_model extends Model { 500 Server when load model - El Forum - 03-01-2011 [eluser]InsiteFX[/eluser] Your missing your Constructor in your Controller! Code: class Login extends CI_Controller { InsiteFX 500 Server when load model - El Forum - 03-01-2011 [eluser]drseuss[/eluser] I added the code as you did. It still didn't work. I am doing this on a localhost linux laptop. idk if that helps any. I've been trying all day. 500 Server when load model - El Forum - 03-01-2011 [eluser]CroNiX[/eluser] If its CI2, its model_name extends CI_Model, just like extending the CI_Controller 500 Server when load model - El Forum - 03-01-2011 [eluser]InsiteFX[/eluser] Opp's missed that one CroNix, thats what happens when your up all night reinstalling Windows 7 Pro and all updates and applications. Get kind of buggy eyed! InsiteFX 500 Server when load model - El Forum - 03-01-2011 [eluser]drseuss[/eluser] ![]() 500 Server when load model - El Forum - 03-02-2011 [eluser]danmontgomery[/eluser] [quote author="InsiteFX" date="1299057706"]Your missing your Constructor in your Controller![/quote] Constructors are inherited like everything else. If you're not doing any extra work after the parent's, the constructor is unnecessary. 500 Server when load model - El Forum - 03-02-2011 [eluser]InsiteFX[/eluser] I go was just going by the CI 2.0 guide lines. InsiteFX |