An Error has occurred! Unable to open configuration.php file to write!

This is driving me absolutely nuts!

I have taken a backup of my online site and am working on a local copy prior to upgrade. Apache is running as www-data and i can see that configuration.php is writable by that user as are all the directories. However, 'Directory Permissions' in admin tells me otherwise.
There are old (server) paths in the config visible through admin. These are unchangeable. It's as if the installation is looking at a completely different config file to the one i'm editing and it has the old server paths in it, but HOW could that be?
LVL 87
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJAuthor Commented:
Sorry that doesn't help - $live_site and $ftp_root are always empty with my sites and the paths are set to the right values. The config file i'm looking at through admin is clearly the wrong one. Where it's 'coming from' is currently quite beyond me
Peter HartCommented:
you need to edit the configuration.php file and change the paths you find in there.
CEHJAuthor Commented:
Yes, i know that, but the problem was a little different. (See below)

The ghastly truth is that what was happening is that index.php was doing a redirect (because of a dodgy webroot) and because i'd forgotten this, i was actually getting redirected to the live site as opposed to the offline one

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJAuthor Commented:
Sorry folks - thanks for trying, but my stupid error!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.