Loading...
 
Architecture / Installation

Architecture / Installation


Issue with two tiki sites on one IIS server

posts: 3

My client asked me to duplicate their current tiki setup so they could have one site for production usage and a second for testing. The current production site was laid out as a virtual directory like this (all for example's sake):

Real location:
C:\prod

URL:
https://wiki.domain.com/prod/tiki-index.php

This worked for years.

So, I copied the C:\prod location to C:\staging and set that up in IIS as a virtual directory on the same default server. Now we have these locations:

C:\prod
C:\staging

I duplicated the production database of db_prod as db_staging and changed the local.php file in C:\staging\db to look at db_staging.

If I navigate to https://wiki.domain.com/staging/tiki-index.php it works, but any changes made affect the PRODUCTION site. I added some error_log entries to see what is going on, and it appears that it is using *SOME* of the files from production. Specifically, the tiki-index.php is correctly being pulled from staging, but anything in a subdirectory seems to be pulled from prod, Additionally, the production database is being used. I renamed local.php in staging and the site never noticed, which tells me that it's being redirected somehow to not even read that file.

I need these two tiki installs to function separately as far as files, and use separate databases. (I know there is a multi-tiki which uses the same set of files, but this is not an option due to security restrictions on the data housed on this system...some people can access staging but must not be able to access production.)

I've dug around everywhere I can think in IIS to find where this issue could be. ANY IDEAS will be welcomed!

posts: 23 United States

I am new to tiki but experienced in CMS's so take what I say in context as I may be off.

When you copied the folders in the dev site did you clear the cache?

If you did then it sounds like tiki also saves the database info in more then one place. Finding out where is the key, I'd pose that question of one of the devs

Hope that helps.

posts: 3
Hmm...my initial answer would be yes, I cleared the caches. But, I did it from the admin menus...so, that means I likely cleared the production caches, not the staging caches. So, perhaps I'd best try manually clearing those folders instead of going through the obviously confused menu interface.

posts: 1563 Germany

Try this:

https://wiki.domain.com/staging/tiki-admin_system.php?do=all

You seem to work with Windows and IIS . Most of us work with Linux and Apache or NGINX or some maybe Lighttpd.

So there might be things going on, which some of us are not aware of ... usually in an average Linux/Apache environment, ist is no problem to clone a website. Even more, with some cron job and some automatted svn up, setup.sh and installer script you can nearly easy run a parallel (once cloned) staging website with the same content as the prod, but on a higher Tiki version.

I have no idea, what causes your problem, if not the cache, sorry. Maybe a server issue?

Regards,
Torsten


posts: 3

Found it!

The problem was that they had set include_path in the php.ini to the path of the production site and its subfolders. So, *every* include or require which involved a relative path was resolving to the one in the production folder first, completely ignoring the staging site's local files.