I am facing the error in ConnectionManager::getDataSourcewhile dynamic database switching logic in the model
// theme.php code <?php class Theme extends AppModel { var $name = 'Theme'; var $useTable = false; // Code to Switch between multiple database var $useDbConfig; var $requestURL; function __construct() { if(!empty($_REQUEST['url'])) { $this->requestURL = $_REQUEST['url']; if(substr_count($this->requestURL, '/ unicode')) { $this->useDbConfig = 'unicode'; parent::__construct(); } else if(substr_count($this- >requestURL, '/ansi')) { $this->useDbConfig = 'ansi'; parent::__construct(); } else { header("Location: /modes/ error"); } } } // Code Ends Here.. this logic works fine, if the enter the the url directly on the browser address bar or the links on the same domian page. if i have clicked from external site reference to this page, i get this FATAL ERROR message "Fatal error: ConnectionManager::getDataSource - Non-existent data source in /var/ www/html/cake/libs/model/connection_manager.php on line 113" USE CASE to reproduce this error: 1. Try to open this URL by pasting on the browser address bar: http://saadhaara.com/themes/home/ansi/kannada 2. you'll see few Notice / Warning message along with the HTML content which is ansci based content (Not easy to read, its in indian language), but this is the expected result 3. Now, Open this URL: http://kanlit.net/, and click the link "saadhaara" which tries to load the same URL as specified above. 4. Now you'll find the FATAL ERROR message and no HTML content I am wondering, what is the problem with this code. Its works fine in my local setup of the site in all the USE CASES which specified above. please provide some light on this, i appreciate your suggestion/ feedback. Br, Raghava Kotekar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---