Page 1 of 1

Problems running two sites from same MySQL database

Posted: Thu Jan 20, 2011 3:10 am
by oliau
Hello,

I've encountered a problem running CMSMS from a host which has only supplied one database.

Site A has been running for some time and the DB prefix uses the default "cms_". This site continues to function.

Site B has been configured to use "equ_" as the table prefix. The tables are copied over from a staging server (where everything works fine but the sites are in different databases) and imported into the same database as Site A.

After reconfiguring config.php to use the correct paths and the new database details (user/pass/host/db name) the site does not load correctly. It appears to be using components from Site A's tables even though the prefix has been reconfigured to use "equ_".

Any ideas on how to troubleshoot this?

Thanks in advance.

Re: Problems running two sites from same MySQL database

Posted: Thu Jan 20, 2011 4:36 pm
by Wishbone
Turn on debug mode in your config.php. It will tell you the exact SQL queries that are generated. This will verify your claim that it is using the wrong tables.

Re: Problems running two sites from same MySQL database

Posted: Thu Jan 20, 2011 4:44 pm
by oliau
OK. I have turned on debug mode and it does show some errors but they are PHP errors not MySQL queries.

Relevant section:

Code: Select all

<!-- Displaying News Module -->
<!-- News Categories: '' -->
string(157) "Smarty error: [in module_db_tpl:News;summaryequipe_news_summary line 18]: [plugin] modifier 'equ_escape' is not implemented (core.load_plugins.php, line 124)"
<!-- Start News Display Template -->
<!--  <p>
Page&nbsp;1&nbsp;of&nbsp;2
&nbsp;<a href="http://site/index.php?mact=News,m4f83d,default,1&m4f83dnumber=2&m4f83ddetailpage=announcements&m4f83dpagenumber=2&m4f83dreturnid=15&page=15">></a>&nbsp;<a href="http://site/index.php?mact=News,m4f83d,default,1&m4f83dnumber=2&m4f83ddetailpage=announcements&m4f83dpagenumber=2&m4f83dreturnid=15&page=15">>></a>
</p>
-->
<div class="NewsSummary">

<div class="NewsSummaryLink">
<h4><br />
<b>Fatal error</b>:  Call to undefined function smarty_modifier_equ_escape() in <b>/cust-web/j/i/L3283938/sites/site/html/tmp/templates_c/News^%%D0^D06^D06DAFAF%%module_db_tpl%3ANews%3Bsummaryequipe_news_summary.php</b> on line <b>32</b><br />