CodeIgniter Forums
Weird echo of $config coming back when I load Email Library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Weird echo of $config coming back when I load Email Library (/showthread.php?tid=29959)



Weird echo of $config coming back when I load Email Library - El Forum - 04-27-2010

[eluser]k00k[/eluser]
I posted this over at StackOverflow as well. I apologize if anyone has seen it twice.

Version info: CI version 1.7.2 - PHP 5.3.1 - Apache2 - Mac OSX 10.6.3

For some reason, when I load CI's email library, either in my controller, or in autoload.php, it automatically and immediately echoes the config info like so:

Code:
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE

If I autoload the email library in autoload.php, it is echoed before anything else in my source/page. If I call it explicitly within my controller, it's echoed at that exact point.

I'm stumped, never seen that before. Any ideas on how to surpress/eliminate?

My code for loading the library in autoload: $autoload['libraries'] = array('database','encrypt','email');

My code for loading the library in the controller: $this->load->library('email');


Weird echo of $config coming back when I load Email Library - El Forum - 04-27-2010

[eluser]k00k[/eluser]
Found the issue. There was a config file in place for email in /system/application/config/email.php

It was missing the <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

Put that as the first line and now it all works.