[Solved] - Problem in loading Validation Library - 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] - Problem in loading Validation Library (/showthread.php?tid=12300) |
[Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]Prasanna[/eluser] Hi all, I have presented my code below which causes error on my server. But i have tested the same code in some other server, it works fine. So may i know what causes error in the server. Do i needs to check any php.ini settings ? Code: <?php Output: Code: A PHP Error was encountered Can any one guide me on how to fix this issue. Please help me. [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]Shahgeb[/eluser] load library fo validation in constructor not in index function [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]Prasanna[/eluser] If i load the validation library in the constructor then it's working fine. But i needs to know why it has to be loaded in the constructor as i does not need the validation library in all the functions of the sample class. The same problem occurs while loading some models. Also we have completed project in the way i have given. So any please provide any alternative solution for the problem. [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]Shahgeb[/eluser] for this purpose you have load library in that paricular function than it will work. reason have mentioned in user guide in codeignitor. fine hope you got [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]xwero[/eluser] What is line 33? I just tried your code but without the fields part and it worked. [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]Shahgeb[/eluser] for loading modle you are facing same problem. try to solve it yourself [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]janogarcia[/eluser] Prasanna, check your system/logs directory, maybe the validation library is being loaded automatically by another library that you specified in autoload.php ie: Session class with sess_encrypt_cookie set to TRUE (This led me once to a bug when the user was idle for a time longer than sess_expiration) Look for this line in your logs Code: Validation Class Initialized If that's your case, check which library is loading it and under which circumstances. [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]Prasanna[/eluser] I have updated my post as the line number i have specified is wrong. Now it's perfect. [Solved] - Problem in loading Validation Library - El Forum - 10-14-2008 [eluser]xwero[/eluser] Couldn't you just add a comment this line is the problem So it's the line were you add the field. Are you sure the login_username is loaded in the language library? you can check it using Code: print_r($this->lang->language); [Solved] - Problem in loading Validation Library - El Forum - 11-06-2008 [eluser]Prasanna[/eluser] For me this solution got worked Use the following line in the .htaccess file. php_flag zend.ze1_compatibility_mode off For more info have a look @ this http://ellislab.com/forums/viewthread/52308/P15/#450647 |