CodeIgniter Forums
Class MY_ not found - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Class MY_ not found (/showthread.php?tid=395)



Class MY_ not found - djcata - 11-28-2014

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


RE: Class MY_ not found - Rufnex - 11-29-2014

Try to put it in /application/core/ i think you have extended the CI_Benchmark class.


RE: Class MY_ not found - djcata - 11-29-2014

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


RE: Class MY_ not found - Smith - 11-29-2014

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.


RE: Class MY_ not found - Rufnex - 11-29-2014

As Smith wrote you shoul user at least CI 2.2 or better CI 3.


RE: Class MY_ not found - djcata - 11-29-2014

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


RE: Class MY_ not found - Rufnex - 11-29-2014

Yes for php files you have always to open the content with <?php to call the interpreter to parse it as php.


RE: Class MY_ not found - djcata - 11-29-2014

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


RE: Class MY_ not found - Rufnex - 11-29-2014

Have you loaded the session library in config.php


RE: Class MY_ not found - djcata - 11-29-2014

i have this in autoload.php :
$autoload['libraries'] = array('database','session','user_agent','image_lib','MP_Cache','Assets');