Welcome Guest, Not a member yet? Register   Sign In
form_validation library loading headers?
#1

[eluser]takasia[/eluser]
I'm sorry if I am mistaken, but just to be sure :-)
Is the form_validation library loading headers?

I noticed that I can't redirect or use fpdf library when the form_validation is loaded.

For example:

function __construct(){
parent::MY_Controller();
$this->load->library('form_validation');
$this->load->database();
}

makes the fpdf say "Some data has already been output" and die.
It also causes redirect(); to return blank screen.

All is perfect when I remove this line:
$this->load->library('form_validation');
and load the validation library only in the functions that use it.

I didn't apply any changes the form_validation library that comes with CodeIgniter.

Any ideas?

As headers_sent() returned 1, I checked what headers_sent() would tell me, and it told me this:

Array ( [0] => X-Powered-By: PHP/5.3.1 )

BTW - it's happening in most the controllers I have, I checked most of them just being curious :-P

I'm on XAMMP on Windows 7 right now, but I have confirmed this issue on Linux server as well.
#2

[eluser]Atharva[/eluser]
[quote author="takasia" date="1292245055"]

function __construct(){
parent::MY_Controller();
$this->load->library('form_validation');
$this->load->database();
}



[/quote]

Shouldn't it be
Quote:parent::Controller();
?
#3

[eluser]takasia[/eluser]
[quote author="Atharva" date="1292245528"][quote author="takasia" date="1292245055"]

function __construct(){
parent::MY_Controller();
$this->load->library('form_validation');
$this->load->database();
}



[/quote]

Shouldn't it be
Quote:parent::Controller();
?[/quote]

Why?
I have My_Controller working, as an extention to the Controller.

http://ellislab.com/codeigniter/user-gui...asses.html

I use Controller before login and My_Cotroller after login - it checks if user is logged properly and it's working fine...

Also - the same issue occurs with both, the Controller class and My_Controller. :-(




Theme © iAndrew 2016 - Forum software by © MyBB