Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: How to change database password?  (Read 2525 times)

0 Members and 1 Guest are viewing this topic.

Golf Girl

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
How to change database password?
« on: November 30, 2007, 07:21:15 pm »

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?
« Last Edit: November 30, 2007, 10:58:17 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: How to change database password?
« Reply #1 on: November 30, 2007, 07:30:38 pm »

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.
Logged

Golf Girl

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: How to change database password?
« Reply #2 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. 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  :'(
Logged

Nibbler

  • Guest
Re: How to change database password?
« Reply #3 on: November 30, 2007, 08:17:28 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:

Code: [Select]
<?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.
Logged

Golf Girl

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: How to change database password?
« Reply #4 on: November 30, 2007, 10:22:02 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:

Code: [Select]
<?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  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.056 seconds with 20 queries.