Welcome Guest, Not a member yet? Register   Sign In
Form Validation Callback Not Working on Server (but OK on WAMP)
#4

Yes I had created the MY_Form_validation file.

After much searching and hair pulling, I finally found a solution in the comments of a youtube video! I'll post is here in case anyone else has the same problem.

I needed to add the line 'public $CI;' to that file to get it to work on the server. I installed my CI site on 2 different servers and both had the same problem with the callbacks, even though the callbacks were working on my local WAMP setup.

Anyway, the full file becomes:



PHP Code:
<?php

class MY_Form_validation extends CI_Form_validation {

public 
$CI;

function 
run($module ''$group ''){
(
is_object($module)) AND $this->CI = &$module;
return 
parent::run($group);
}



Thanks for your suggestions anyway.

Now I have a problem with sessions disappearing on the server, but that's another story...
Reply


Messages In This Thread
RE: Form Validation Callback Not Working on Server (but OK on WAMP) - by 50cent - 03-18-2016, 03:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB