This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Legacy site with Symfony 1.0 not loading right classes

Notes and reports about symfony 1.0.x stable

Legacy site with Symfony 1.0 not loading right classes

by SomeDude » Mon Nov 12, 2012 2:03 am

I recently had to start making small changes to an existing site so I downloaded it and tried to run it but get an error:

Code: Select all
Call to undefined method sfContext::getController() in /home/user/www/site.com/web/index.php on line 16


I tried to figure out which file is being loaded by inserting these lines with this command in idex.php right before the dispatch call.

Code: Select all
$reflection = new ReflectionClass('sfContext');
$classFile = $reflection->getFileName();
die($classFile);

sfContext::getInstance()->getController()->dispatch();



And it looks like file loaded is:

Code: Select all
/home/user/www/site.com/lib/vendor/symfony1.0/test/unit/sfContextMock.class.php


I checked php version and php.ini and they are identical. I cant figure out why wrong class is being loaded or what the problem is. Any tips are greatly appreciated.
SomeDude
Member
 
Posts: 56
Joined: Wed Feb 20, 2008 7:44 am