Page 1 of 1

Github Flatpress 757 - PHP 8.1.12 - Fatal error

Posted: Wed Oct 26, 2022 4:05 pm
by laborix
A test on a Windows server with Apache 2.4.54 server (fcgid mode) with PHP 8.1.12. Rebuild the Index with a full backup of Flatpress attachs, entries and images.

Code: Select all

HP Fatal error:  Cannot backup old index. STOP. in .../fpgit757/admin/panels/maintain/admin.maintain.php on line 148
I am relatively sure that this worked under PHP 8.1.10 with the Flatpress Github 756. Unfortunately I don't have the possibility to recreate this, but it should be fixed.

Again, for reference:
This is an Apache 2.4.54 server (fcgid mode).

regards

Re: Github Flatpress 757 - PHP 8.1.12 - Fatal error

Posted: Thu Oct 27, 2022 5:24 am
by laborix
The problem with the Fatal Error can be reproduced as follows:

1. log in to FlatPress
2. administration area - maintain
3. purge theme and templates cache
4. rebuild index

and the Fatal Error described above appears ;)

But the whole thing works if you use one of the following two solutions:

Manually delete the complete content of the FlatPress cache folder using an FTP program.

or:

Do not delete the FlatPress cache via "Purge theme and templates cache" before the rebuild.

1. log in to FlatPress
2. administration area - maintain
3. rebuild index

I leave it open whether this is an urgent error that needs to be fixed.

Re: Github Flatpress 757 - PHP 8.1.12 - Fatal error

Posted: Sun Oct 30, 2022 12:21 pm
by Arvid
I was able to reproduce this behaviour. Oddly, if you run into the error, you can just refresh the "lowres" page to make it work :shock:
Couldn't find the cause on first sight; I opened issue 162.

Thanks for reporting!

Re: Github Flatpress 757 - PHP 8.1.12 - Fatal error

Posted: Sun Dec 18, 2022 11:54 am
by Arvid
Found the cause: Since the index dir has an open handle pointing to it when the cache needs to be created, it can't be renamed. When reloading the page, the cache already exists, and the renaming of the index dir will work.
I added a helpful error message.

All the best,
Arvid