Welcome Guest, Not a member yet? Register   Sign In
Weird echo of $config coming back when I load Email Library
#1

[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');
#2

[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.




Theme © iAndrew 2016 - Forum software by © MyBB