Hi all,

I installed this site about a week ago and it has been fine then suddenly tonight it tells me
http://juc1.byethost7.com/michelle/

Site off-line
The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

When I check settings.php, the base url line has changed and instead of http://juc1.byethost7.com/michelle/ now says
# $base_url = 'http://www.example.com';

How is it possible for settings.php to change like this?????????

Now I can't even change it back due to file permission restrictions ie I don't think I can edit, rename or delete my settings.php.

Any help please??

Comments

narayanis’s picture

it sounds like your default.settings.php was renamed and overwrote your standard settings.php. If Drupal notices the file is writeable, it sets it to read-only. You'll need to change it back to writeable and make the necessary changes. If your host offers cPanel, you can do it through the file manager there, if you're not familiar with working through SSH.

Juc1’s picture

Thanks, Cpanel tells me 'settings.php was successfully chmodded to 777' but then when I try to edit settings.php I still get 'Status: This file could not be saved'. I could be wrong but I vaguely remember that my host might have some kind of restrictions on changing file permissions so the message 'settings.php was successfully chmodded to 777' might be misleading.

I am not familiar with SSH. Any other suggestions please or maybe I will have to wait for my host to reply to my query.

I will try uploading a new settings.php in filezilla, don't know if that will work.

Thanks

Juc1’s picture

Filezilla message...
550 Could not delete settings.php: Permission denied

553 Rename/move failure: Permission denied
Error: Critical file transfer error

Juc1’s picture

@ narayanis, I still don't know how my read-only settings.php was changed but it seems to be the single line mentioned above re the base url that is affected. The earlier line in settings.php (which in default.settings.php is
$db_url = 'mysql://username:password@localhost/databasename';) still shows the correct information.

Juc1’s picture

update - I have checked another installation of Drupal on the same byethost7.com server and there is exactly the same problem. http://juc1.byethost7.com/pics/
This site installed correctly about a week ago and worked fine but is now saying...

"Site off-line
The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider"

Same problem = the same line in the read only file settings.php (htdocs/pics/sites/default/settings.php) has somehow changed.

I have done nothing that could cause a change to settings.php = I don't know how this is happening????

Heine’s picture

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

You checked your db settings. Now, contact your hosting provider to see if the db server is running (and still running on the same host).

Juc1’s picture

Ok thanks I think this is now resolved with the help of my web host but here is a drupal question...

Suppose drupal is installed and everything works fine then a few days later the database password in settings.php is changed to an incorrect password - what would happen?

Would this account for my experience =

drupal installed, pages added, works fine for several days
database password in settings.php is changed to an incorrect password
site still works fine for another few days
then another page is added, site disappears with the message

Site off-line
The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

and - here is the weird bit - the base url in settings.php has changed to the pre-installation form of
# $base_url = 'http://www.example.com';

Of course I can know that the wrong database password in settings.php would cause the site to fail but would it cause the weird thing of changing the content of the read-only file settings.php?

thanks