Posts: 50
Threads: 5
Joined: Nov 2014
Reputation:
0
Hello
i have a little problem
i have inherited a Codeigniter project who does not work ,and i did not find a solution
the error is Fatal error: Class 'MY_Benchmark' not found in system/codeigniter/Common.php on line 130
MY_Benchmark class is put in application/libraries and is created correctly
please help me
Posts: 512
Threads: 7
Joined: Oct 2014
Reputation:
35
Try to put it in /application/core/ i think you have extended the CI_Benchmark class.
Posts: 50
Threads: 5
Joined: Nov 2014
Reputation:
0
hello
thank you for replay ...i am using codeigniter 1.7.3 and there is no application/core folder,should i create it ? is true that CI_Benchmark is extended
Posts: 12
Threads: 3
Joined: Nov 2014
Reputation:
1
Hi djcata,
I recommend using version 2.2. It is the most stable version and most recently for the production. Surely with this version does not have that problem.
Posts: 512
Threads: 7
Joined: Oct 2014
Reputation:
35
As Smith wrote you shoul user at least CI 2.2 or better CI 3.
Posts: 50
Threads: 5
Joined: Nov 2014
Reputation:
0
thank you
i know that it would be better with newer version , but project was developed with older one and i am not sure how many changes has to be made to upgrade
anyway it seems that if i put <?php in place of <? at the beginning of the file this error goes away
Posts: 512
Threads: 7
Joined: Oct 2014
Reputation:
35
Yes for php files you have always to open the content with <?php to call the interpreter to parse it as php.
Posts: 50
Threads: 5
Joined: Nov 2014
Reputation:
0
yes but i did not realize that , there are a lot of files there , didn't checked all
now i have another error : i get call to undefined function and if i comment that code i get the next error Non-existent class: Session
Posts: 512
Threads: 7
Joined: Oct 2014
Reputation:
35
Have you loaded the session library in config.php
Posts: 50
Threads: 5
Joined: Nov 2014
Reputation:
0
i have this in autoload.php :
$autoload['libraries'] = array('database','session','user_agent','image_lib','MP_Cache','Assets');