Welcome Guest, Not a member yet? Register   Sign In
Bug in Form_validation.php? _error_messages is being reset
#1

[eluser]seonghuhn[/eluser]
In a previous post I noted that my form validation was not working in production while it is working on my local.

Upon further investigation I found that I am properly adding my error message in the set_message function of Form_validation.php. I outputted the _error_messages array and saw that my error message was added.

However later when validation fails and Form_validation.php checks to see if the error message has the rule that failed, the _error_messages array is empty. Looking through the code though I can't see how this could be possible. I only see Form_validation initialized once so I don't think it's an issue w/ a different thread handling the validation later.

Since this is only happening in my hosted environment and not in my local I wonder if this is a PHP bug.

I am running CodeIgniter 1.7.2.

My hosted environment is PHP 4.4.9 on Apache 2.2.16 on Linux.

Locally I am running PHP 5.3.0 on Apache 2.2.14 on Windows.

Any help would be most appreciated! Should I report this bug?
#2

[eluser]InsiteFX[/eluser]
I do not think this is a bug but the version of PHP.

I would get hold of your hosting company and ask them
to upgrade the PHP version to 5.

Most hosting companies are running PHP 5.

InsiteFX
#3

[eluser]seonghuhn[/eluser]
I updated my server to use PHP 5.2.14 and it is now working. Thanks for the suggestion!




Theme © iAndrew 2016 - Forum software by © MyBB