Welcome Guest, Not a member yet? Register   Sign In
__autoload error :


I am trying to setup my project on a linux server. After doing everything, I am getting the error as mentioned below. I have put the statement:

echo "<br>class is $class";

in the 'load_class()' in codeigniter/Common.php file.

class is Benchmark
class is Exceptions
Fatal error: Cannot redeclare __autoload() (previously declared in SERVER_BASE_PATH/system/application/config/config.php:345) in SERVER_BASE_PATH/system/application/config/config.php on line 357

I read various posts which mentioned about dompdf, using spl, but that didn't help. Can someone help as to what is the issue here?


Welcome to the CodeIgniter forums.

...So what's the code on lines 345 and 357 of your config.php?

[eluser]Phil Sturgeon[/eluser]
Looks like your config.php is being loaded twice. You could use if(!function_exists('__autoload')) around your autoload function, but I would be more concerned about why your config is loading twice in the first place.

To test if it is as Phil said, just put an echo at the top of your config file, if it appears twice, then that is the problem, otherwise, we need to do some more head scratching

Theme © iAndrew 2016 - Forum software by © MyBB