Welcome Guest, Not a member yet? Register   Sign In
Cannot modify header information - Codeigniter / DataMapper OverZealous Edition
#1

[eluser]Watermark Studios[/eluser]
Just so everyone knows...yes, I have checked other threads here and other places online for help.

I'm getting the below error:

Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at E:\inetpub\vhosts\...\httpdocs\main\application\controllers\test.php:19)

Filename: codeigniter/Common.php

Line Number: 356
A Database Error Occurred

Unable to connect to your database server using the provided settings.

Let me set the stage here a bit. I have a working site that uses the CI/DMZ config to access the database. Every other model is working fine. I set up a test controller so I could investigate. Below is the method that is returning the error:

Code:
15 function country(){
16   $location = new Location();
17   $location->where('country','US')->where('type','MAI')->get();
18   $count = $location->where('country','US')->where('type','MAI')->count();
19   echo $count . "<br/>";
20   foreach ($location->all as $loc) {
21     $loc->user->get();
22     echo $loc->user->lastname . "<br/>";
23   }
24 }

The Count variable is correctly returning the number of results. The first 30 last names are also returned, so it is working initially. The rest of the results are omitted and the error kicks in.

Any thoughts?


Messages In This Thread
Cannot modify header information - Codeigniter / DataMapper OverZealous Edition - by El Forum - 02-13-2010, 03:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB