View Thread
Private Stock » Administrative and Housekeeping » Site Notes
 Print Thread
PHP-Fusion v7.02.07 vs PHP7
Royce
I have my PHP-Fusion sites running on webhost PHP 5.6. PHP-Fusion v70.2.07 does not work with PHP7.x. Tried changing to P{HP7.0, 7.1, 7.2. Fusion won't run.

A handful of posts/threads on http://php-fusion.cok.uk and the PHP-Fusion USA support site discuss and attach fix files for Fusion v7.02.07 to make it work with PHP7.x. So... based on a specific discussion on the main PHP-F support site and the available fix files download in it posted by douwe_yntema, I applied the fix.

Now running on that fix/patch, PHP-Fusion v7.02.07f (I''ll append the "f" to denote the fixed application version) runs on PHP7.x. But not without problems:

(1) Going into the disucssion forums, no text in the threads/posts show up. If I go to edit any of the posts, the text is actually there in the database, but won't display normally when not in edit mode. Switching back to the unfixed files, the post displays are there. Re-apply the fix files, and the displays are not visible.

I switched themes thinking it may be a theme issue with the fix files. Same issue.

I posted the problem on the PHP-F support si8e in continuing the same thread that I got the fix files from. Senior member douwe_yntema suspects bbcode conflict and suggest I disable bbcodes one at a time. But, upon going to the bbcode admin page, I found that the disabled bbcode window also does not display any disabled bbcodes. Enabled bbclodes are displayed, so I disabled the mail bbcode, and now I cannot see it in the disabled bbcode screen to re-enable it if I wanted to. So 'm stuck with that troubleshooting effort.

(2) I can't add file attachments to foerum posts/threads. Whenever I do a file attach and then attempt to save, the save fails and "Prevented an unwanted file upload attempt!" is returned. I haven't begun to investigate this one.

For now, I'm trying to be patient in waiting for help on the PHP-F support site. DH supports PHP5.6 until Jan 2019 and then it will be all PHP7.x, so the Fusion sites will die by then if not fixed to work with PHP7.x. PHP-Fusion v9.x is an upgrade option but that platform is not ready as far as I'm concerned. I may have to ditch PHP-Fusion for Wordpress or something else for good if nothing promising comes out of this soon.
Royce attached the following file:
You are not allowed to see attachments in this thread.
 
Royce
Problem fixed.

(1) There was an error in the fix file /administration/bbcodes.php. In line 170 or so, there's a code
Download source  Code

$__BBCODE__ = "";
that had to be changed to
Download source  Code

$__BBCODE__ = [];
. This fixed the disabled bbcodes list not showing up on the screen.

(2) In disabling each bbcode to isolate which one was causing the issues, I disabled the BOLd and ITALICS bbcodes but then couldn't enable them. Come find out that there's a bug in the coding in /admininstration/bbcodes.php, around line 49. I had to change:
Download source  Code

} elseif (isset($_GET['enable']) && preg_match("/^([a-z0-9_-]){2,50}$/i", $_GET['enable']) && file_exists(INCLUDES."bbcodes/".$_GET['enable']."_bbcode_include_var.php") && file_exists(INCLUDES."bbcodes/".$_GET['enable']."_bbcode_include.php")) {

to
Download source  Code

} elseif (isset($_GET['enable']) && preg_match("/^([a-z0-9_-]){1,50}$/i", $_GET['enable']) && file_exists(INCLUDES."bbcodes/".$_GET['enable']."_bbcode_include_var.php") && file_exists(INCLUDES."bbcodes/".$_GET['enable']."_bbcode_include.php")) {

noting the {2,50} change to {1,50}. This, for the bbcode.php to check for 1 to 50 characters of a bbcode instead of 2 to 50.

(3) The problem ended up being the [img-l] and [img-r] bbcodes that I had enabled. Evidently it causes problems with the PHP7.x fix files somehow. So I disabled them.
Edited by Royce on 08/22/2018 05:00
 
Jump to Forum:
Top Top  2,027,161 unique visits  Top Top