PDA

View Full Version : Test Environment Behaving Strangely


findingpeace
10-10-2013, 09:05 PM
I made a mirror image of my forum (mysite.com) at mysite.com/test

I followed the instructions here:

http://www.vbulletin.com/vbcms/content.php/225-Creating-A-Test-Site

The problem is, every time I change something on mysite.com/test/admincp, the change also reflects on mysite.com - I first noticed this when I changed the cookie path to /test/, and suddenly everyone got kicked out of mysite.com!!

I tried changing the title to TEST, and mysite.com got a changed title to TEST!

What is going on? Fortunately tools.php helped me fix the main site, but I need a working test environment that I'm not afraid of :) I don't even understand how this is possible, because config.php is literally going to two different databases. So how is one updating settings for another?

Totally different cookie prefix, username, and password in config.php as well.

Thanks!

Disco_Dave
10-10-2013, 09:16 PM
Have you changed your site URL in your ACP? This is the first thing I do when making a dev.

findingpeace
10-10-2013, 09:46 PM
Hi Disco_Dave, thanks for responding! Yes, I did change the site URL and homepage - anything else that might need tweaking? I'm wondering if maybe my old cookie is still stuck on the test environment, so it still thinks I'm making changes to the real site? I don't know, so confused.

Digital Jedi
10-10-2013, 09:49 PM
I've honestly never heard of that happening, and I can't imagine how that could happen. Only thing I can think of of is if, however unlikely, your databases still have the same name. (?)

findingpeace
10-10-2013, 09:58 PM
Nope, two different ones - just checked in PHPMyAdmin! It makes NO sense with them pointing to different databases - one should not be impacting the other. Could it have anything to do with my .htaccess?

TheLastSuperman
10-10-2013, 10:10 PM
Try changing the cookie prefix in the config, by default it's bb and I bet the cookie is conflicting with your browser and causing this... I've never heard of it doing this except in cases like DJ mentioned where someone had the same database name and details in the test site config as the live site which of course is how they are showing the changes made on one site on the the other.

Still sounds odd though.

findingpeace
10-10-2013, 10:11 PM
Hi TheLastSuperman, thanks! Cookie prefix was already changed to bbqa :( So I'm not sure what the heck else could be causing this

ozzy47
10-10-2013, 10:21 PM
Maybe your config.php file?

findingpeace
10-10-2013, 11:22 PM
Hi ozzy, thanks! I can't find any other settings in config.php that I could change - I've switch the DB, username, password, and prefix

RedTurtle
10-10-2013, 11:29 PM
If you can do it, I'd recommend making your test site on a subdomain instead of on the same domain but in a sub-directory.

If your site is mysite.com, intead of doing mysite.com/test/ try doing test.mysite.com. You can add a subdomain easily in cPanel and then set it up there.

I've never had any issues doing it that way but I do remember running into some problems before when I would create it as a subdirectory on the main domain.

Lynne
10-10-2013, 11:35 PM
Any type of caching on your server like xCache or memcache?

findingpeace
10-10-2013, 11:36 PM
xCache, Lynne - should I turn it off on my test site?

Digital Jedi
10-11-2013, 12:18 AM
Something I would also check. When you go into the Admin CP of your test site, take a look at what the links in your ACP are pointing to. Are they pointing to files in the test ACP, or your main domain ACP? Change the skin in your ACP. See if that change is reflected in your main domain's ACP. See if any of that helps narrow the problem down.

findingpeace
10-11-2013, 12:21 AM
Hi Digital Jedi, thanks! All links pointing to the test site - where can I change the ACP theme?

Digital Jedi
10-11-2013, 12:39 AM
vBulletin Options ? Admin Control Panel Options. It would be interesting to note if the ACP is also affecting the main board.

findingpeace
10-11-2013, 12:49 AM
Jeeze, Digital Jedi, that killed our main site again!!!! Turned off xcache in both configs, and now everything is okay. I can change themes, page titles, etc - so what's going on?? Can I turn back on xcache for my main site? Thanks everyone!

Digital Jedi
10-11-2013, 01:15 AM
I'm not as familiar with xcache as others might be, but if it really is chaching PHP pages the way it's supposed to, then it might be wise just to run it on the main site. Again, I don't know much about how it works, but if you have everything backed up, testing with the demo xcache off shouldn't be a problem. No reason why it would really need to be on, on the demo site. Because very few people will ever have access to it.

findingpeace
10-11-2013, 01:22 AM
Thanks! So if I turn xCache back on, it won't screw up everyone's cookies again and log them out?

Digital Jedi
10-11-2013, 01:37 AM
I can't say for certain. All I know is it's definitely not needed for the demo site. However, I couldn't say what changes were already enforced when they were both active. That's why I say you shouldn't proceed unless you have a fairly recent backup.

findingpeace
10-11-2013, 01:39 PM
Alright! Re-enabled xCache for the main site. Everything is working as expected. Thanks everyone for your help!! Hopefully this might save someone else a few headaches if they are making a test environment and also have xCache turned on. Also, tools.php is your friend :)

Lynne
10-11-2013, 08:44 PM
If you use xCache, you need to make sure to give each vbulletin instance it's own datastore prefix or you will have issues (like what you saw):

$config['Datastore']['prefix'] = '';

findingpeace
10-11-2013, 10:08 PM
Thanks Lynne! You are awesome and all-knowing, as usual :) Your first post helped me get everything solved - never even would have thought of xCache if you hadn't added that.

Will my main forum be alright, now that xCache is off for the test forum? I just want to make sure I didn't screw anything up on the backend by having that enabled for a bit. Everything has seemed okay today.

Lynne
10-12-2013, 01:32 AM
I use xCache on my live site. I just turn it off for my test sites - no real reason to have it on some site where I am the only user!