Welcome Guest, Not a member yet? Register   Sign In
CI update from 1.7 to 2.0 getting Fatal error: Class 'CI_Controller' not found in CodeIgniter.php on line 210
#1

[eluser]tdegryse[/eluser]
I am trying to update CI 1.7 to CI 2.0 and followed the guideline for that (http://ellislab.com/codeigniter/user-gui...e_200.html), for some reason I keep getting following error: Fatal error: Class 'CI_Controller' not found in folders\system\core\CodeIgniter.php on line 210

I copied the website locally and I'm using Easyphp 12.1, the point of the whole thing is to update CI but also make some changes to the website. I really need to get started in the changes. If you need more info, please let me know.

Thanks in advance,
Toon
#2

[eluser]boltsabre[/eluser]
Sorry if this sounds stupid or just plain obvious, but did you replace the old "Controller" file with the new "CI_Contoller" file?
#3

[eluser]tdegryse[/eluser]
I'm not sure if this is the wrong way but actually I installed the update and copied my files into the CI update. Then I adjusted the files in the application folder accordingly ..
#4

[eluser]boltsabre[/eluser]
Hmmmmm... I cannot see it being a problem.

Can you remember if you (or anyone else) hacked your core files? I did an update 4 months ago and it took me all day because when I very first started with CI two years ago I changed one or 2 lines of code in one of the core files. Bam... update fail because I replaced my "hacked" file with the new "clean" file, thus breaking my application.

Or perhaps make a copy of your "old" site and try running the update the way they say and see if that makes a difference?
#5

[eluser]tdegryse[/eluser]
I'm trying the old site on a new host, same version of php as the old one. I will let you know how it goes...

Is there a way to tell if the core files were touched or not besides opening all of them and comparing to a fresh download of CI 1.7?
#6

[eluser]InsiteFX[/eluser]
Just delete the CI system directory and copy the new one over, then in your files
change Controller to CI_Controller, Model to CI_Moidel and make sure you copy
the new index.php file over. Replace all the application/config files.

Also It uses the new php Constructor.
#7

[eluser]tdegryse[/eluser]
Hey insiteFX,

In the old version the application folder is inside the system folder, should I copy my application folder into the root folder?

I have tried to take CI 2.0 and replace all the files in the applications folder with my own files. Then I changed all the constructors in my controllers. I changed the class extension to CI_Controller and CI_Model. After that I replaced the index file and the htaccess file. Am I missing something?
#8

[eluser]InsiteFX[/eluser]
Yes, it should be like this for the new version of CodeIgniter.

Code:
application
system
index.php
assets
-- css
-- img
-- images
-- js
-- etc;
#9

[eluser]tdegryse[/eluser]
Thanks, now I have arranged all my files into this structure. I saw that the libraries in my project also extend Model .. I assume these have to change to CI_Model as well?

Any other changes I have to make so the program will find all the correct files on the correct locations?

@boltsabre: I've tried to upload the old website but then you talk about an update to do. Anyhow the old website is not showing, I assume because of a slightly different version of php.

Thanks a lot!
#10

[eluser]tdegryse[/eluser]
So I have started all over (again), copied my files separately into their new CI2 folders. I've adjusted the files after copying of course (constructor, extensions, etc)

Now I get two messages:
1. Fatal error: Call to undefined method CI_Security::SetLastPage() in ci\application\controllers\front.php on line 43
2. Message: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in mysql_driver.php

I know the second one is just deprecated but I keep this message for now, it gives me more energy than an empty screen does.

The fatal error, i'm curious if it's because I copied the security.php into the wrong folder? Or is there another reason?

Edit

I have new loaded MY_Security.php into appliation/libraries and my two message are gone. I'm stuck with the same message as when I started: Fatal error: Class 'CI_Controller' not found in CI\system\core\CodeIgniter.php on line 210


Thanks guys, any help is much appreciated!
Toon




Theme © iAndrew 2016 - Forum software by © MyBB