Trying to go live - being redirected from live site to test site
Hello,
I'm trying to take my site live. My customized theme is working now, but only after I configured it. Only a few of the core and non-core modules were enabled, so I went through and enabled the ones I need. All the permissions and other module configurations need to be set again, so it's obvious I missed something critical.
I'm putting the live site on a shared web host(Bluehost) and have done a fresh install of Drupal 6.12 (same as my dev site) using SimpleScripts. I've imported the SQL database, copied over a customized theme to sites/all/themes, copied non-core modules (including Ubercart) to sites/all/modules, and copied my entire sites/all/default/files folder. I also copied my settings.php after changing the base_url & database url.
I somehow managed to get most of my data tables duplicated, so I'm wondering if this is whats causing the config problem. The live database has the 115 tables (with the correct data) contained in the dev database, but it also has most of the same tables prefixed with drup_, so I have a total of 218 tables on the live site. I've had some training in SQL, but I'm basically a novice. I'm assuming the drup_ tables were put there when I installed Drupal with SimpleScript, so can I simply drop them? Or is there a better way?
I'd really appreciate some help - thanks!

DB issue after importing to live site
Update:
In a closer look at my live site's settings.php, I noticed $db_prefix = 'drup_'. So now I changed it to match the database imported from my dev site $db_prefix = '', then ran update.php again.
Bigger problems now -- when I navigate to my live site's url in the browser, the web page shows me that my dev site is off-line for maintenance! If I try to get in to the live site from there using ?q=user, I getting redirected to my dev site's url!
Desperately need help. Wondering if I should start over on my live site's install.
Maybe you have good reasons
Maybe you have good reasons to take the approach you're taking now, but I wouldn't. I think it's easier and less risky to just copy everything to from the one server to the other. In short: copy all the files to the new server, export-import the database into the new database, adjust settings.php and give it a go.
I have no experience with Bluehost nor SimpleScripts, but when you talk about the drup_ tables, I'm wondering if Drupal is somehow still reading the prefixed tables. However since you copied your original settings.php, that should not be the case, at least not in theory. I think it could do no harm if you just dropped the drup_ tables - after all, you still have your original development site properly backed up, right?
I took this approach
I took this approach following the procedure in "Moving Entire Drupal Site with Databases" http://drupal.org/book/export/html/120612
I'm wondering too if Drupal is still reading the prefixed tables. I have several backups from my dev site, both with Clean URLs and without, so I might just keep playing around while I wait to see if anyone else comes up with any other ideas before I start all over.
Thanks for replying.
OK, I didnt read your update
OK, I didnt read your update above before posting my reply. Since the 'drup_' prefix was still in settings.php, I take it that you didn't just copy your old settings.php, but merged two settings.php files into one. You may want to check if the $base_url variable is correct. Another thing you could try is to clear the cache manually: in phpmyadmin, just empty all tables that start with 'cache_'. If that doesn't work, I would indeed start over with a clean slate.
I've checked (and re-checked)
I've checked (and re-checked) the $base_url and it's correct. I did as suggested and cleared the cache manually for all tables starting with cache_, but there's no change.
Importing SQL database
When I import a databaseusing phpMyAdmin, shouldn't it replace all the tables in the existing database? I'm wondering why this happened in the first place. I don't want to start over with a clean slate only to have the same thing happen again if I'm importing incorrectly.
No, a database export is not
No, a database export is not more than a series of sql queries saying "add this table, insert this data, add that table, insert that data..." By default, it doesn't tell the database to drop all existing tables. On the other hand, those drup_ tables shouldn't be any problem as long as your settings.php is configured the right way.
Frustrated
I have now deleted the original database on my live site, created a new one and imported to it using a fresh copy of the structure and data from my dev site. I now have the same 115 tables on my live site that are on my dev site. I have verified the $db_url, $db-prefix and $base_url are correct for my live site in settings.php. I've compared the entire file to my dev site's file. The settings.php file does not have the url for my dev site anywhere in it, yet the site maintenance page that appears on my live site's url is for my dev site and when I enter my live site's url followed by ?q=user, I am redirected to my dev site's url. Are there any other config files that I need to look at?
Very frustrating.
I understand your
I understand your frustration. Some more questions for you: Did you use any modules that could cause redirects? Did you edit the .htaccess file? Does your settings.php contain "custom_url_rewrite_inbound" or "custom_url_rewrite_outbound"? Can you post a link to the live site, so I can check for you if I get redirected as well?
marcvangend: Thank you for
marcvangend: Thank you for taking the time to respond.
live site: http://www.louiestoybox.com/
test site: http://www.patwintheiser.com
This is the original file that was in place:
# Use PHP5 as default
AddHandler application/x-httpd-php5 .php
Question about the .htaccess file. I ran across a 2nd one on my test site in stes/all/default/files. Does it belong there in addition to public/html root?
Funny, Opera allows me to go
Funny, Opera allows me to go to http://www.louiestoybox.com/?q=user, but firefox redirects to the test domain. Both browsers complain about the security certificate, because the domain doesn't match the certificate. I have little knowledge of sercurity certificates, but maybe the browser is redirecting you to the domain on the certificate?
(And yes, there should be a .htaccess in the files folder, but with different contents.)
Thank you for taking a look
Thank you for taking a look at it. I'm using Firefox, but will try it with IE. I'm using a self-signed certificate on my test site, but I purchased an SSL certificate from Bluehost.
On IE, ?=user takes me to the
On IE, ?=user takes me to the log in screen for what appears to be my live site, but after I enter my log in info, I am directed to my test site. ?=admin also takes me to my test site.
I checked the folder containing my SSL certificate and all files have only the live sites name. I've downloaded all the files from my live site's public_html to my pc, searched all files for my test site's name and it does not appear in any of the files, so I do not know how I am being redirected. Could it be from the configurations in my database that I copied over from my test site. Perhaps I didn't prepare my test site properly before exporting it? I disabled clean urls and put it in maintenance mode. Should I also have switched to a default theme?
I don't think switching the
I don't think switching the theme could solve this problem, but you can try. You could also try to search all files and the complete database for the test site url - maybe that provides a clue...
Maybe I didn't make that
Maybe I didn't make that clear, but I did search all the files in my public_html on my live site for my test sites url. I also searched the database just now with no hits there either.
My live database search must
My live database search must have been incorrect. I searched again and see there are entries for my test site in some of the tables. Not fully understanding it, I suspect the entries in watchdog are ok, but possibly the 8 entries in the variables table might be of concern, especially with securepages_basepath and securepages_basepath_ssel showing my live site url.
Good news. I edited the urls
Good news. I edited the urls in the variables table changing them to my live site and I'm able to get into my live site now without being redirected to my test site. Progress :-) Thanks everyone! :-)
Great, I'm glad you got it
Great, I'm glad you got it working. So if I understand correctly, it was the secure pages module (http://drupal.org/project/securepages) which caused this?
Yes. those variables are set
Yes. those variables are set by Secure Pages module. So, I guess I answered incorrectly when I said I wasn't using any pages that redirected. I went out to check the configuration on that module this morning, and the fields asking for Non-secure Base URL and Secure base URL were now blank. I then checked the database and the variables were now empty there too. The strange thing is, the live site pages have been switching back & forth between http and https on both Firefox & IE. I have now filled in those fields again to reconfigure it and the pages are still switching back & forth as they should.
Maybe it's a good idea to
Maybe it's a good idea to share your experiences with the module maintainers, so they can consider if any improvements can be made, either in code or in documentation. The best place to give feedback would be in the issue queue at http://drupal.org/project/issues/securepages.
I just chalked it up to me
I just chalked it up to me being a Drupal newbie.
Well that shouldn't matter...
Well that shouldn't matter... if the maintainers can prevent future newbies from running into this problem by adding a couple of lines to the documentation, I think they should.