How to change database password? How to change database password?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

How to change database password?

Started by Golf Girl, November 30, 2007, 07:21:15 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Golf Girl

My webhosts in their wisdom have reset all of the passwords relating to my account. This means that I can no longer access my gallery. I have found out where the DB info is held (ie in include/config.inc.php) but I don't seem to be able to change this file. I have tried changing the permissions for the file in SSH but I get a message saying that I am unable to do this. Can anyone help please?

Nibbler

If you don't have the required permissions then you'll need to ask your host to change the ownership of the file for you.

Golf Girl

There is no reason why I should not be able to change the permissions for this or any other file. I have installed everything that I'm running on the site. I assumed that it was maybe some safety mechanism in the gallery software that was preventing me from doing so. Contacting my 'host' is not an option for the foreseeable future, they are not answering phones or e-mails following this fairly major cock-up. So it looks like I'm stuck, unless anyone can suggest another way round this  :'(

Nibbler

Quote from: Golf Girl on November 30, 2007, 08:01:06 PM
There is no reason why I should not be able to change the permissions for this or any other file.

Yeah there is. Your server has been configured by your host to run as a different user to you. The config file was created by your server not by you and you do not have permission to modify it.

If you can't contact your host then you can try deleting/recreating or renaming the file instead. Alternatively you can write your own PHP script to modify or delete the file. Since that script  will run as the server it will have permission. Simplest way would be this:

Make a copy of config.inc.php file, apply the modifications to correct the data to your copy, then upload and run this script from your Coppermine directory:


<?php

unlink
('include/config.inc.php');

?>



Then rename your copy back to config.inc.php and delete the unlink script you uploaded. If you can't even read the file then recreate it using the sample file as a reference.

Golf Girl

Quote from: Nibbler on November 30, 2007, 08:17:28 PM
Make a copy of config.inc.php file, apply the modifications to correct the data to your copy, then upload and run this script from your Coppermine directory:


<?php

unlink
('include/config.inc.php');

?>



Then rename your copy back to config.inc.php and delete the unlink script you uploaded.

That did the trick. Thank you so much  :)