cakephp - How to avoid accessing one app controller from another app -
i have 2 cakephp directory in server in separate path . cakephp application 1 located in /var/www/html/app1/v11/. application can accessed via http://example.com . cakephp application 2 located in /var/www/html/ app2/ v12/app. application can accessed via sub.example.com/app2 . cakephp app 2 having controllers/models/views of cakephp app 1 excepted 2 new controllers.
when accessing sub.example.com/app2/comps/list url , shows undefined error
notice (8): undefined variable: res [app/controller/compscontroller.php, line 681] code context $stack = array() compscontroller::trending() - app/controller/compscontroller.php, line 681 reflectionmethod::invokeargs() - [internal], line ?? controller::invokeaction() - /var/www/html/app1/v11/lib/cake/controller /controller.php, line 488 dispatcher::_invoke() - /var/www/html/app1/v11/lib/cake/routing/dispatcher.php, line 103
dispatcher::dispatch() - /var/www/html/app1/v11/lib/cake/routing/dispatcher.php, line 85 [main] - app/webroot/index.php, line 96 null
ie accessing controller v11 app. how avoid this
i guess settings in webroot/index.php
incorrect.
specifically, line - make sure it's different each app, , points correct location.
define('app_dir', basename(dirname(dirname(__file__))));
Comments
Post a Comment