IMHO that the paths are being cached in APC.
If both virtual hosts are available at the same time for the same Apache webserver, they need unique cache prefixes in core.php.
https://github.com/cakephp/cakephp/blob/3aa189eb3a49abfb31cd1b25b32505d249e95044/app/Config/core.php#L323-324
--
Simon Males
-- If both virtual hosts are available at the same time for the same Apache webserver, they need unique cache prefixes in core.php.
https://github.com/cakephp/cakephp/blob/3aa189eb3a49abfb31cd1b25b32505d249e95044/app/Config/core.php#L323-324
On Fri, Jun 28, 2013 at 8:07 AM, Reuben <reuben.helms@gmail.com> wrote:
Having a strange problem this morning.I've been working on an internal project, CakePHP 2.3.6, PHP 5.2.17, Apache 2.2.17 on Windows.The source of the project was located in C:\dev\projects\otw-ordering\src, with the webserver also pointing to that directory. The Server Name is ordering.host.reubenh.dev.otw.internal.I decided I had some major changes to make, but wanted a new branch to do it in, but also wanted to access both branches at the same time. So I copied the project directory to C:\dev\projects\otw-ordering-dev, cut the branch and made a new vhost entry called ordering-dev.host.reubenh.dev.otw.internal. I also updated the database.php so it pointed to a copy of the database, since I had some changes to make there as well.Now when I try accessing the new system, I get a database error because I've removed some of the fields from the new database i.e. Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'User.company_name' in 'field list'However, the thing that bakes my noodle is the Strack Trace,C:\dev\projects\otw-ordering\src\lib\Cake\Model\Datasource\DboSource.php line 460 ? PDOStatement->execute(array)C:\dev\projects\otw-ordering\src\lib\Cake\Model\Datasource\DboSource.php line 426 ? DboSource->_execute(string, array)C:\dev\projects\otw-ordering\src\lib\Cake\Model\Datasource\DboSource.php line 669 ? DboSource->execute(string, array, array)C:\dev\projects\otw-ordering\src\lib\Cake\Model\Datasource\DboSource.php line 1080 ? DboSource->fetchAll(string, boolean)C:\dev\projects\otw-ordering\src\lib\Cake\Model\Model.php line 2696 ? DboSource->read(User, array)C:\dev\projects\otw-ordering\src\lib\Cake\Controller\Component\Auth\BaseAuthenticate.php line 100 ? Model->find(string, array)C:\dev\projects\otw-ordering\src\lib\Cake\Controller\Component\Auth\BasicAuthenticate.php line 117 ? BaseAuthenticate->_findUser(string, string)C:\dev\projects\otw-ordering\src\lib\Cake\Controller\Component\Auth\BasicAuthenticate.php line 93 ? BasicAuthenticate->getUser(CakeRequest)C:\dev\projects\otw-ordering\src\lib\Cake\Controller\Component\AuthComponent.php line 695 ? BasicAuthenticate->authenticate(CakeRequest, CakeResponse)C:\dev\projects\otw-ordering\src\lib\Cake\Controller\Component\AuthComponent.php line 547 ? AuthComponent->identify(CakeRequest, CakeResponse)C:\dev\projects\otw-ordering\src\app\Controller\UsersController.php line 11 ? AuthComponent->login()[internal function] ? UsersController->login()C:\dev\projects\otw-ordering\src\lib\Cake\Controller\Controller.php line 486 ? ReflectionMethod->invokeArgs(UsersController, array)C:\dev\projects\otw-ordering\src\lib\Cake\Routing\Dispatcher.php line 187 ? Controller->invokeAction(CakeRequest)C:\dev\projects\otw-ordering\src\lib\Cake\Routing\Dispatcher.php line 162 ? Dispatcher->_invoke(UsersController, CakeRequest, CakeResponse)APP\webroot\index.php line 110 ? Dispatcher->dispatch(CakeRequest, CakeResponse)Somehow, it's picking up the source from the original project, instead of my new project!I've added an info.php to the app/webroot of the new project, containing <?php echo phpinfo(); ?>, and it's locating that file just fine.I've got to investigate further, but I thought I might ask if anyone has seem something like this before? I suspect shenanigans when locating the Cake lib directory.RegardsReuben Helms--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
--
Simon Males
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment