[Solved] - Problem in loading Validation Library |
[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. 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. I have also gone through the core files and found that there is function called "get_instance" with return the instance of the current controller (i.e., $this). Instead of using like the following, which causes error Code: //Type 1 Alternatively i have tried using like the following which works fine. Code: //Type 2 To my knowledge $this && $this->get_instance() are the same. If not, let me know the difference. So may i know what causes error in the server. The same problem occurs while loading some models. Do i needs to check any php.ini settings ? Code: <?php
[eluser]jeephnx[/eluser]
Hi. I seem to have the opposite problem. 1) If I load the validation library in the constructor, the validation fields do not display. 2) If I load the validation library in the function, the validation fields display correctly. The validation rule runs fine in either case (it correctly returns TRUE or FALSE). This only happens on my Linux server. On my PC server its fine.
[eluser]manilodisan[/eluser]
The validation should work as you have the code, however, try: Code: <?php
[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
[eluser]admiral[/eluser]
Hi all, A lot of time elapsed but I have similar problem while using set_rules() function from form_validation library. I tried to add Code: php_flag zend.ze1_compatibility_mode off I added following line: Code: @ini_set('zend.ze1_compatibility_mode', '0'); Any ideas? |
Welcome Guest, Not a member yet? Register Sign In |