Dev site error showing up on live site as well

I use drupal and I setup my dev site in my public html. So my test site url is mysite.com/dev. I noticed whenever there is an error on my drupal configuration or module on the dev site, the errors also show on the live site. They are not using the same database so I don't know why this is happening. When I was on a shared hosting, my setup was exactly the same without any problem.

How do I setup a dev site properly with linode? Thanks.

6 Replies

Try moving your dev site to a different subdomain, such as dev.mysite.com. Create another virtual host just for the dev site. That way, you'll have more control over various settings. (For example, a setting in an .htaccess file in the root of the live site could affect your dev site if the latter is in a subdirectory.)

Hi Hybinet, thank you for your advice. I followed your advice and and moved the dev site from /srv/www/mysite.com/publichtml/dev to /srv/www/dev.mysite.com/publichtml/. I created a separate virtual host for it and now it's dev.mysite.com. However I'm still having the same problem. For example an overhead menu that I created on the live site is also showing on the dev site. I removed it on the live site and now it's no longer showing on the dev site.

I'm not sure what to do anymore. This is really frustrating as I really need a place to test things.

Thanks.

Are you sure the databases are separate? Are your drupal/sites/default/settings for your live site and your dev site pointing to the correct databases?

Yes, the database names are different. I made sure.

That's very strange.

Let's make sure that you're actually visiting the dev site. Is anything at all different between the two sites? Any chance you're getting silently redirected to the live site, or vice versa? WordPress used to (and still might) point all internal links at the domain where it was originally installed. That was really annoying. I'm not sure whether or not Drupal does something similar, but it's worth checking.

Do you use APC, Memcached, or any other mechanism that might be used to store information in a shared location? Loading website configuration from the database at every request is resource-intensive, so I can imagine web apps trying to cache those things.

Are you sure that the databases are actually different? Try connecting to the dev database manually and change some random data that is safe to change, such as titles of posts. Does the change show up in the dev site, the live site, or both?

Clear your browser cache and cookies. Cookies for mysite.com might affect dev.mysite.com, because cookies often cover all subdomains.

That's all I can think of right now. If all else fails, see if you can separate the two sites by cloning your Linode and putting each site on different Linodes. An extra 512 costs only $0.67 per day, and you can cancel it as soon as you find out what the problem is.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct