Unbelievable that such a simple thing as an upgrade to a newer version of CMS may cause any headache these times. Recently I have received a warning message from my host (lunarpages.com) that I still use an old version (1.7.2) of Joomla! for my company site, while a newer version is available. I have tried to follow official upgrade procedures for about an hour without success, resulting in wrong layouts and half-working admin functionality, and finally ended up just downloading the complete package for Joomla_3.1.5-Stable-Full_Package.zip and simply unzipping it to the current installation folder. That did the trick (well, almost) leaving me with the similarly popular warning message
Error
Your host needs to disable magic_quotes_gpc to run this version of Joomla!
After some googling around the following solution worked. I have created two files as shown below in the folder with Joomla! installation (so not affecting other websites) and that did the trick.
[php.ini]
magic_quotes_gpc = Off
session.save_path = "/home/<user>/tmp"
[.htaccess]
/home/<user>/www/<site>/php.ini
Enjoy!