A little help with Drupal 7 on Linode :-)

Hi,

I've spent today moving a medium sized (1GB) Drupal website from a traditional shared host to Linode. I'm pretty impressed with Linode, I'm not a Linux expert, but the Library has been extremely useful in getting everything set up. I've installed Ubuntu 12.04 LTS, used the LAMP stack script to setup Apache etc, got my Drupal files and database successfully moved over, added SSL certs and setup DNS. The web site looks perfect, but there's something not quite right …

For example, if I attempt to set the site into maintenance mode through the Drupal admin interface, I don't get any errors but after I've clicked the "Save" button, the page just reloads with the previous content - i.e., it doesn't save the settings I've just made.

The website is an e-commerce store. As a customer, I can browse the store just fine, but if I try to add an item to my basket, nothing happens. I click the "Add to basket" button, the page just refreshes and nothing is added to the basket.

My initial thoughts were maybe that MySQL wasn't writable, but I've checked that using the SHOW GRANTS FOR CURRENT_USER; command whilst running the mysql command line tool as the same user account that Drupal uses.

Had a look in the /var/log/mysql folder - there was only one file there, error.log, but that doesn't seem to have anything logged in it since the initial install of MySQL earlier today.

Can't see anything obviously wrong in the Apache logs either.

Any clues, anyone?

Cheers,

Mark.

2 Replies

chipfat,

  • Do you have 'display errors' turned on?

  • Nothing in your mysql logs? Does your site define an alternate location for the log files?

  • What do your main logs say? (apache, php & mysql)

  • Assuming your site uses the DB to store the config it certainly sounds like the DB user can't update the DB. Have you tried your 'root' MySQL user in your site's DB config to eliminate this possibility?

  • What directory does your site to use for sessions? (often it's /tmp)

  • Does your site have permission to access the directory used for sessions?

MSJ

Hi MSJ,

I got it working in the end, your suggestions gave me a couple of things to try I hadn't thought about - brain is getting a bit tired after my new adventures in Linux today :-)

Firstly, the main thing that was missing was that modrewrite wasn't enabled in Apache. Because most of my URL rewriting was, apparently, working I didn't think that it might be disabled. However, as soon as I enabled modrewrite the bits of the web site that weren't working sprung into life.

I had another issue with some of the administrative parts of the web site that weren't working correctly. This was down to file permissions. In my case, applying the recommendations from here - https://www.drupal.org/node/244924 - did the trick. Effectively, as I'd moved across from shared hosting, everything there was permissioned with the owner and group being the same, i.e. the account that the shared hosting provider had assigned to me. Now that I'm on a private server, I had to change the group to www-data. With that done, the permissioning issues went away.

So, all looking good now, I think! Have put a couple of low value orders through the web site and everything seemed to go through correctly, so looks like it's all running well.

Thanks for your help,

Mark.

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