Topic: conf.php losing settings

Hi

I've been using cutenews for many years and always been happy with it, and I still am, however since moving my site to a new host and updating the CuteNews script my conf.php periodically resets, losing all settings including paths etc.

This is happening at random and it could happen a couple of weeks apart, or a couple of days apart, and at any time of the day or night. There seems to be no pattern.

It doesn't seem to happen because of anything I actively do. ie I can happily add news items, edit, or anything without it triggering the problem.
I simply get a report that there is no news on the site again, at which point I simply upload a backed up conf.php, and reset the rss in the integration wizard everything is back to normal.

I have completely reinstalled the latest version of CuteNews a few days ago and that hasn't stopped it happening again today.

When I look at the files on the server I can see the conf.php has been updated because of the datestamp.
Also many of the 20xx-xx-xx.php files in the "news" dirctory have had their datestamp updated, although there is no obvious change to the content when seen on the site, and there are lots of cache_A2 files there. In fact the files in the news directory seem to be constantly updating according to the timestamps dispite the fact I haven't edited or added anything. For example looking right now at the last few files in timestamp order:

cache_A2_da3c91e67fadbbf6c52aeb7f94a105d3.txt -  21/02/2019 14.20
2013-08-09.php - 21/02/2019 14.21
2016-6-08.php - 21/02/2019 14.30
2011-09-12.php - 21/02/2019 14.40
cache_A2_46d45b97cf6f499a82064877750e6f38.txt - 21/02/2019 14.57
cache_A2_106c8b094590c6aef8fe0dcafbdc93f0 - 21/02/2019 14.59
cache_A2.txt - 21/02/2019 15.00
cache_A2_76d8d763f79e57a37b9ec7e884395cae.txt - 21/02/2019 15.00

I notice that the last two files update when I refresh the page (which I did at 15.00) in my browser so probably not related to the issue, but the 20xx. files don't seem to update related to that, and assuming the date relates to the date of the original post, they seem to be changing/updating in a completely random order, and it's a constant process with a different file updating every few minutes over a couple of days. I mention this as I don't know if this is supposed to happen or if it's another symptom.

I have even tried making that file un-writable through file permission (with the idea of changing it if I ever needed to change the configuration) but that didn't protect the file. The file was still updated/changed removing the settings.

I do have over 10 years of posts, mostly archives. Not sure if that could be important.

As you can probably tell I'm not an expert at programming or a profession web design. I just have a basic knowledge of designing websites, and I have always liked CuteNews because it was simple and worked without mySQL etc, but if I can't find a solution to this issue I will have to find something else, which I dread as there is so much in the archives that would need converting!

I've tried to include as much information as I can see. Sorry of some isn't relevant.

If anyone has any ideas I would appreciate suggestions to fix this!

Thanks

Re: conf.php losing settings

It's really strange as the conf.php file can be saved only by users with admin rights in special cases like changing categories. Try the following actions: edit the core/core.php file, where the function is setoption($opt_name, $var) for the string

$fx = fopen($dest, 'w+');
fwrite($fx, "<?php die(); ?>\n" . base64_encode(serialize($cfg)) );
fclose($fx); rename($dest, $fn);

Comment out all the lines so that the config file can't be saved.

// $fx = fopen($dest, 'w+');
// fwrite($fx, "<?php die(); ?>\n" . base64_encode(serialize($cfg)) );
// fclose($fx); rename($dest, $fn);

If the problem persists, please inform us.

Best regards,
CN Support team

Re: conf.php losing settings

Thank you for the reply, but I'm afraid it's to late now.

As I couldn't find any solution and seemed to be getting no reply here I had to give up on CuteNews and move to a different option.

4 (edited by RecordDroid 2021-06-30 05:47:50)

Re: conf.php losing settings

kermitzz wrote:

Thank you for the reply, but I'm afraid it's to late now.  DGCustomerFirst

As I couldn't find any solution and seemed to be getting no reply here I had to give up on CuteNews and move to a different option.

Many thanks for that complete information!