I am having a problem where changes to settings.php changes are not being read.

For example, I have tried creating a brand new install (of Drupal 7.32), and this all goes fine, so I have my perfectly working new Drupal 7.32 site. Then I change the value in settings.php to pick an invalid name for the 'database' => 'notexist', but no matter what I do the system still uses the old value. I have tried completely clearing the Drupal cache and the browser cache many times. I have checked and double-checked that the settings file I am changing is the one that Drupal is using. I have even traced through with Eclipse debugger, seen the new file in the debug screen as it goes through settings.php, but then watched as the $databases variable gets the original database link.

I have made sure I have unset the read-only nature of the file and saved the changes.

This is completely stumping me.

Thanks for any help!

Comments

John_B’s picture

Look at the whole settings.php - if you created it with Acquia Dev Desktop the format is different, as it is for some sites upgrade from D6 (obviously not relevant here; the D6 format for the db connection does work, but is not in the correct D7 array style, and I have seen that behaviour when using it on D7).

If it still does not work, maybe you are suffering with an opcode cache in PHP not refreshing? Try disabling ACP or the native opcode cache if using PHP > 5.4.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

drupalshrek’s picture

Thanks for the suggestions John. I think you're right that it sounds like some sort of PHP cache not refreshing. One other symptom I notice is that if I trace in debug with Eclipse, there can be a mismatch between the settings.php line which is being traced and the reality (e.g. Eclipse 'executing' some comment lines).

I'm just using plain old WAMP, though it is a different version of WAMP to what I had previously, so I guess something in there is the problem. Anyway, thanks for the idea. I'll investigate this avenue...

drupalshrek

drupalshrek’s picture

I tried installing my older version of WAMP (2.4), rather than the latest version (2.5), but the problem continued.

I then tried to install XAMPP instead. This fixed the problem!! Hooray!!!

What is a bit weird is when I moved the files over from the WAMP directory to the XAMPP directory, the settings.php file suddenly appeared as it looked like I imagined it would be when running (i.e. the version that PHP seemed to be when running). Now, I had checked it already with simple text editor to make sure that it was not Eclipse showing me the wrong thing.

Anyway, in the end, it's working now.

Thanks for your help!

drupalshrek

John_B’s picture

Welcome.

It's odd. I found WAMP & XAMPP a pain anyway, so I tend to to Dev Desktop & VMs.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors