Welcome Guest, Not a member yet? Register   Sign In
Updated to CI 2.1.0
#1

[eluser]Alix.G[/eluser]
Hey there I've updated to 2.1.0 and my application is now giving me an error:

Quote:Fatal error: Class 'User' not found in /home/alixg/alixg.com/application/controllers/home.php on line 44

I'm using spark and phpactiverecord and I've followed the user guide to update CI from 2.0.3 to 2.1.0.

Thanks
#2

[eluser]skcin7[/eluser]
I just wanted to post in here to say I had the same problem and I also fixed it using what sineld said.

I just upgraded from CI 2.0.3 to 2.1, and was getting PHP Errors caused by PHP-ActiveRecord Spark. I was using version 0.0.1. I tried to load the Spark manually like sineld said and it didn't fix it, so I upgraded PHP-ActiveRecord from 0.0.1 to 0.0.2 and it fixed the problem. I didn't have rename the "sparks" function to "spark" inside MY_Loader.php (this is the 2nd part of what sineld said) because it was already named spark.

The solution works good for me too. Just wanted to share that I had success with this too. I am going to try to find a way to autoload the spark so I don't have to do it manually.
#3

[eluser]sineld[/eluser]
I am happy to hear it has worked for you @skcin7. Thanks.
#4

[eluser]Alix.G[/eluser]
You should go to getsparks.org. They fixed it by modifying the MY_Loader.php. So if you still want the ability to autoload
http://getsparks.org/static/install/MY_Loader.php.txt
#5

[eluser]skcin7[/eluser]
[quote author="Alix.G" date="1329226300"]You should go to getsparks.org. They fixed it by modifying the MY_Loader.php. So if you still want the ability to autoload
http://getsparks.org/static/install/MY_Loader.php.txt[/quote]

Hmmm... a quick copy/paste and replacing my old MY_Loader.php file with this one yields a PHP error something like:

Fatal error: Uncaught exception 'ActiveRecord\ConfigException' with message 'Invalid or non-existent directory: ' in C:\xampp\htdocs\websites\diftx\dol\sparks\php-activerecord\0.0.1\vendor\php-activerecord\lib\Config.php:212 Stack trace: #0 C:\xampp\htdocs\websites\diftx\dol\sparks\php-activerecord\0.0.1\vendor\php-activerecord\ActiveRecord.php(30): ActiveRecord\Config->get_model_directory() #1 [internal function]: activerecord_autoload('CI_Exceptions') #2 [internal function]: spl_autoload_call('CI_Exceptions') #3 C:\xampp\htdocs\websites\diftx\dol\system\core\Common.php(143): class_exists('CI_Exceptions') #4 C:\xampp\htdocs\websites\diftx\dol\system\core\Common.php(481): load_class('Exceptions', 'core') #5 C:\xampp\htdocs\websites\diftx\dol\sparks\php-activerecord\0.0.1\libraries\PHPActiveRecord.php(25): _exception_handler(8, 'Undefined varia...', 'C:\xampp\htdocs...', 25, Array) #6 C:\xampp\htdocs\websites\diftx\dol\system\core\Loader.php(1099): PHPActiveRecord->__construct() #7 C:\xampp\htdocs\websites\diftx\dol\system in C:\xampp\htdocs\websites\diftx\dol\sparks\php-activerecord\0.0.1\vendor\php-activerecord\lib\Config.php on line 212

Not too familiar with what the hell is going on inside MY_Loader.php but I will look through this on my own and try to find what's causing this. Any ideas to help me out? EDIT: Using CodeIgniter 2.1 and PHP-ActiveRecord Spark 0.0.2.




Theme © iAndrew 2016 - Forum software by © MyBB