Thread Like Summary
Gizmo, isaac, JAISP, Morgan
Total Likes: 12
Original Post (Thread Starter)
by Morgan
Morgan
I use 7.7.4

http://www.britbike.com/forums

Files has been corrupted.

I closed the forum when the trouble began.
I updated the Control Panel > General > HTML Includes header form and submitted
then it stalled and after that I had lost all data in all the forms..
Header Insert For All Pages
Header Insert When Not Displaying a Topic
Default Header
Default Footer

I can see above to the left.. You have not set a title for the community. > Control Panel > General ..
Default Time Format tab the forms are empty
Available Time Formats tab the form is empty
HTML Includes tabs all forms are empty

includes/footer.php - file 0 kb file
header.php - file 0 kb file
privacy.php - file 0 kb file
header-insert.php - file 0 kb file
header-insert-descrip.php - file 0 kb file
community_intro.php



Homepage Name is missing
Homepage URL is missing
Who's Online Settings > Robots (Crawlers) is missing
Social/Sharing Settings > everyithing is missing in the forms
Post Likes Settings > everyithing is missing in the forms
New Post/Reply Page Settings > everyithing is missing in the forms
Topic & Post Page Settings > everyithing is missing in the forms
Default Topics Per Page > everyithing is missing in the forms

Top posters numbers are gone in the portal

config.inc.php seems to have lost about 500 bytes and it seem that config-bak.inc.php was updated the same second that I hit submit.
perhaps the system created a config.inc.php backup there... hmm...



Please advise how I can address this issue!!!
Thanks in advance
Liked Replies
by isaac
isaac
you probably refreshed during the saving of files. thats how this usually happens. the data is replaced with blank data. its extremely rare. but it does happen. backups are the tools that admins use. admins of every single software.

email address is simple to answer. if the field is "" (blank) then it uses the address from the admin user accessing the page. code for that is within the top of /admin/gen_display.php

if you're curious, open the script file and you'll see it near the top. its a fail-safe rick added for when you access the page for the very first time. this field is the return address for all forum emails.
$config['SITE_EMAIL'] = (!$config['SITE_EMAIL']) ? $user['USER_REAL_EMAIL'] : $config['SITE_EMAIL'];

what mogan may have done probably was:
close his browser during the submit screen.
OR did a CTRL-F5 or forced F5
OR opened a new tab
OR anything that would clear the <input> get/post browser data
...on the GENERAL DISPLAY submission screen in a the browser tab.

when this happens, nothing from the entry screen is passed through to it. essentially submitting "empty fields" and creating "HTML INCLUDES" files of zero-bytes. every tab on the General Display settings page is submitted and written at once. all of the tabs on that page.

[Linked Image]


config-bak.inc.php was automatically created prior to any update being done. this is the current backup of forum configuration. it gets replaced with the current settings just before new ones are written. if you make changes, the previous settings will overwrite that file.

you should have a backup plan for your entire site. especially your /includes files.

bonus commentary: my backup plan is to backup the settings and scripts every 24 hours. that file is about 5mb total. after that is done, anything older than 30 days is deleted from the directory. this is all done through the CRON tasks on my server. I also FTP in to my sites on a schedule, and mirror the important data to my local hard drives.
Attachments
2 members like this
by Ruben
Ruben
Deja Vu grin
2 members like this
by driv
driv
This all sounds scarily familiar...

https://www.ubbcentral.com/forums/ubbthreads.php/topics/249949/config-file-wiped-out

https://www.ubbcentral.com/forums/ubbthreads.php/ubb/showflat/Number/247970

https://www.ubbcentral.com/forums/ubbthreads.php/topics/250713/re-config-file-rewritten-with-0-bytes
2 members like this
by Morgan
Morgan
When I found out that the forum was affected I felt like disaster had hit me. When trying to understand the magnitude I posted this message here.
Rubens answer didn't give me much but a tiny bit and that actually got me thinking more constructive.
FYI I have never had to restore anything with the hosts WHM/CP and didn't really dare to hit the start button.
Then I remembered the config-bak.inc.php and checked the time it was created. It was one second after I hit the button when it all happened.
I also compared the files and then used the config-bak.inc.php as config.inc.php.
Suddenly most things started to work and I dared to restote the header, footer and other affected files. All was within /includes.

I am very grateful for the config-bak.inc.php as it made my day. Thanks guys for building that feature.

After a few days it seem that it works ok.

We can't thank the west coast guys enough for your efforts!!!

Oh I'm a west coast guy too.. but on the Swedish coast and that's a complete different story.
Thanks also to Ruben.
2 members like this
by Morgan
Morgan
Hi I restored following files from backup
Includes/footer.php
header.php
privacy.php
header-insert.php
header-insert-descrip.php
community_intro.php

The backup is incremental and it seems that it worked out fine

I changed name on the config-bak.inc.php to config.inc.php and it seems to have worked as well

I miss the robots crawler data but I'll look for that somewhere

Yes I must have refreshed or closed the tab cause it was really slow and timed out.

I hope it works now and I guess I'll open the site

I see in UBB.threads System Requirements Test that some fields are Empty but hope its not any vital..
1 member likes this
by Morgan
Morgan
Its open now
1 member likes this
by isaac
isaac
Thank you Driv. I see your linked posts from 2012 regarding the loss (zeroed-out) of the config.inc.php file, and present you with the following:

UBB.threads 7.6.1 Changelog (January 1, 2018) -
[NEW] The current forum config file is now backed up before new changes are saved. A forum owner can now roll back to their backup config file, if the new one gets corrupted during its creation.
https://www.ubbcentral.com/forums/u.../7-6-1-1-changelog-discussion#Post260743

config-bak.inc.php is mentioned in this thread's OP and a few other times in the replies. As a result of this new feature added in 2018, It appears that Morgan was able to make use of this auto-backed up configuration file for his main settings, in conjunction with a previous backup of his forum header/footers.
1 member likes this
by driv
driv
Originally Posted by isaac
Thank you Driv. I see your linked posts from 2012 regarding the loss (zeroed-out) of the config.inc.php file, and present you with the following:

I am well aware of config-bak.inc.php.
The way that you phrase your response (including date) appears to be patronising. That you don't consider it worthwhile.

I found that lock & write function to be lacking and later discovered that SD (a very experienced programmer) considered the same.
I am simply pointing out that this issue is still happening!

I won't bother in future.
1 member likes this
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Nightcrawler), 639 guests, and 217 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)