1

I'm trying to migrate a site to a new linode environment, and my website has made the journey with the exception(s) that:

I cannot login at /user/login, console shows 404s when submitting credentials and the page simply refreshes. Note: ?q=user DOES work.

When logged in (through ?q=user method), every page i request shows a 404, but then still loads the page. For example, when going to mysite.com/t-shirts, console shows 404 on that address, even though the page loads fine.

Trying to login via colorbox returns (in the modal): Request unsuccessful: error.

All the elements in my pages that use ajax fail, showing 404s in console.

Short URLs SEEM to work, i.e. /catalog returns the proper page (despite 404 in console). I can also get to admin pages with /admin paths, but cannot seem to change anything on those pages because submitting the changes always fails.

What am I missing in migrating this drupal install? Drupal install status whines about GD and cURL missing, but I don't believe this has anything to do with it..

base URL is set to the proper address in settings.php (http://dev.skinnyboyswagclub.com)

2 Answers 2

4

The reason for this is most likely that clean url's are disabled. Make sure that mod_rewrite is enabled in Apache.

Fetching pages still works, because the 404 triggers Drupal, which is then able to return the correct page. That does, as you found out, not work for form submits, because the submitted data is lost when doing the redirect.

7
  • 1
    I assumed rewrite was on because the clean urls seemed to be working despite the errors, however apache reported it as not being enabled. I enabled it with a2enmod, restarted apache, and when I do this the site comes down completely. After disabling rewrite, the site comes back up (after like 10 minutes) any additional pointers would be appreciated! going to look at logs for the time when the sites down of course..
    – AT Design
    Commented Jul 18, 2012 at 22:46
  • i also noticed that the module is called rewrite and not mod_rewrite, in /mods-available/, yet htaccess rules use the condition: if mod_rewrite, does this matter?
    – AT Design
    Commented Jul 18, 2012 at 22:54
  • mod_rewrite/rewrite: that's ok. Please elaborate on "comes down". server error 500? That probably indicates a error/permission problem somewhere. Check your apache error log, it should have more details.
    – Berdir
    Commented Jul 18, 2012 at 23:04
  • /etc/apache2/error.log has only the starting/stopping notices for apache. The error log for the virtual host this site is run in shows a bunch of "file does not exist" messages for every short-url page request. And in the browser, requesting pages after enabling the rewrite module returns 404, not 500. In fact it seems like it cant resolve dev.skinnyboyswagclub.com and so it quickly adds a www before the dev, which of course also fails.. Where else should I be looking to troubleshoot this?
    – AT Design
    Commented Jul 19, 2012 at 4:12
  • everything works fine when using the ip address (50.116.55.233), including login and short urls, the ajax stuff, etc.
    – AT Design
    Commented Jul 19, 2012 at 4:40
0

I would suggest the following:

  1. Check all your logs. These include D7, webserver and syslogs.
  2. Get a vanilla D7 site up & running and iron out all dependency issues.
  3. Make sure that clean URLs and caching are working correctly.
  4. On the migrated site, turn off clean URLs and caching, caching modules etc.
  5. Try commenting out the $base_url option.
  6. Check all your logs. These include D7, webserver and syslogs.

I would also get drush installed (if not already) to both check the status and keep an eye on the watchdog logs.

3
  • Thanks for the tips. First thing I notice in D7 logs are pages of these errors: Warning: unlink(/var/sbscdev/public/sites/default/files/js/js_kf6wmju1CCF0N1cebzbc350wT3UQyPKXcqOwtn3rgvY.js.gz): Permission denied in drupal_unlink() (line 2151 of /var/sbscdev/public/includes/file.inc). does this narrow the scope of troubleshooting?
    – AT Design
    Commented Jul 18, 2012 at 22:27
  • Looks like the files directory (and sub-directory) permissions were incorrectly transferred/reset on the new host. These files are aggregated JavaScript files and might be unrelated to your issue. But it's worth fixing nonetheless. You should also turn off aggregation and other forms of optimisation and caching when debugging such errors.
    – user7667
    Commented Jul 19, 2012 at 6:39
  • I migrated from GoDaddy so the username and group names are all off... I suspect the permissions are how I want them, but need to change the usernames and groups who are assigned those permissions, without changing the permissions themselves.. edit: figured out the proper chown -R cmd a few seconds later ;D thx for your help
    – AT Design
    Commented Aug 23, 2012 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.