Very weird library load error |
[eluser]theseamusjames[/eluser]
On my new cloud host (only one server), I can’t get my Email library to load. Checked my logs and it says “PHP Fatal error: Cannot redeclare class CI_Email in /var/www/html/system/application/config/Email.php on line 29” I’m trying to run a simple test file: public function email_me() { echo '1'; $this->load->library ( 'email' ); echo $this->email->protocol; echo '2'; $this->email->to ( '[email protected]' ); $this->email->subject ( 'Heeeeey' ); $this->email->message ( 'Oh yeaaaah?' ); echo '3'; if ( $this->email->send() ) echo 'yes'; else echo 'no'; } I have exactly one copy of Email.php, in my system libraries (none in application/libraries), and what’s weird is that echo of the protocol kicks back ‘sendmail’ when my email.php is set to smtp. Also, all of the exact same code I have on my local copy works fine. Any ideas?
[eluser]alexaaaaaaaaaa[/eluser]
i think you missed the $this->email->from('[email protected]');
[eluser]theseamusjames[/eluser]
yeah. but that doesn't explain the php error
[eluser]alexaaaaaaaaaa[/eluser]
can you please copy paste what you have on that line config/Email.php ?? wait a second you have a file in config??? why? and most important what does it contains? Becouse it shouldn't be there it should be in system/libraries and if the code it's something like Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); then i suggest you to delete that file from config folder and move it to system / libraries
|
Welcome Guest, Not a member yet? Register Sign In |