Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
public-topic
error_logs report for Simple-Press & PHP7+
Avatar
Ryan
Member
Offline
Dec 29, 2016 - 9:18 pm
Quote
Hi Guys,

I've just updated my site and am running PHP7 now, however I'm getting the following warnings in my error_log

[30-Dec-2016 00:34:38 Europe/London] PHP Warning: Illegal string offset 'topics' in /home/HOSTACCOUNT/public_html/FOLDER/wp-content/plugins/simple-press/forum/content/classes/sp-list-topic-class.php on line 337
[30-Dec-2016 00:34:38 Europe/London] PHP Warning - in_array() expects parameter 2 to be array, string given - file: /simple-press/forum/content/classes/sp-list-topic-class.php - line: 337 - function: in_array

[30-Dec-2016 00:34:38 Europe/London] PHP Warning: in_array() expects parameter 2 to be array, string given in /home/HOSTACCOUNT/public_html/FOLDER/wp-content/plugins/simple-press/forum/content/classes/sp-list-topic-class.php on line 337

Any ideas? If possible can we have a fix for this?
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 30, 2016 - 1:06 am
Quote

@yellow-swordfish has been playing around with php 7.0...  thought things were working fine, but will have to let him answer in the AM...

We definitely want to be 7.0 compatible but so hard now since so many other plugins we use (and occasionally WP though they stay on top of it) are not and we cannot just make the switch...  we have even thought about making php 7 a requirement for the Simple Press 6.0 we have begun work on...  but just too many hosts are not php 7 yet...

Avatar
Ryan
Member
Offline
Dec 30, 2016 - 4:14 am
Quote

Hi,

Yeah, I realise a lot of hosts are still using 5.3-5.6 and don't yet support PHP 7. Mine started to support PHP7 in early 2016.

I waited an entire year to allow plugins to update and start support PHP7 as I did try PHP7 at the start of the year but 5-6 plugins just didn't work due to incompatibilities. However, now the majority of them do support PHP7, the only errors/warnings in my error_log now are the ones I post above and a few with "WishlistMember" (Creating default object from empty value which is easy to fix), although none of them appear to cause a any major problems they're still errors.

Maybe the best solution would be to have a crossover period, where you support PHP5 but only for bugs that impact the functionality and then focus efforts onto PHP 7 for future developments & other bugs.

Too many websites and services take forever to update to latest standards because it requires changes to be made. The only way to make some of them change is to force them.

If Simple:Press said future updates of the forum would only support PHP7+ then everyone would be forced to update to PHP7 or use the "legacy" version until they update/their hosts update/other plugins update. If their hosts don't support it then they can request the hosts to support it or find a host that does support it. Likewise with plugins request that the author supports it or find or make another plugin.

Wordpress themselves could start and force this... simply announce a series of new features/speed improvements but make Wordpress 5.0 only available for users using PHP7+ this would cause a chain reaction of plugins having to support PHP7 as they'd get requests from their users and it would solve the problem while improving website performance, probably also security and it reduces fragmentation & makes it easier to provide support.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 30, 2016 - 5:06 am
Quote

Automattic and the WordPress community have an enormous amount of behind the scenes power and we know the WordPress devs are working all out to get a php 7 minimum requirement in place. I don't personally think we will see hosts drag their heals over php 7 in the same way they did going for php 5. And hosts have a lot to gain form 7 as well...

I am now using it for all development work.

As to your warnings - which all stem from the same empty value by the way - are you sure you are running the very latest version of Simple:Press? This was an issue in 5.7.2 which was corrected in 5.7.3 and has noit popped up anywhere else since then...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ryan
Member
Offline
Dec 30, 2016 - 6:07 am
Quote

Hi,

Yeah, we're not on 5.7.3 at the moment on the main site. So you're right it might be fixed. I'll double check on that one.

What about: 

[30-Dec-2016 11:03:06 UTC] PHP Fatal error:  Cannot use $this as parameter in /home/HOSTINGACC/public_html/FOLDER/wp-content/sp-resources/forum-plugins/google-sitemap/sp-google-sitemap-plugin.php on line 38

This is only with PHP 7.1 and causes the entire site to error 500. (I know 7.1 is fresh, but still worth reporting just incase)

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 30, 2016 - 6:16 am
Quote

I will have to consult with mr papa on that one. Might just be that we shouldn't use $this as a variable name in 7.... We will need to look that up...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Dec 30, 2016 - 11:16 am
Quote

afraid I dont know... I dont have current access to php 7 and cannot test...  on lines 38, 40, 44 and 46, just try changing the $this variable to something else...  but it would have to be changed in the components file as well...  @yellow-swordfish what happens if you try it in your php 7?

Avatar
Joe G
Guest
Guests
Feb 1, 2017 - 2:32 pm
Quote

Hi all. I just changed servers and upgraded from PHP 5.4 to 7. Unfortunately the forum was unavailable and gave a 500 error, which led me to this thread.

My new hosts discovered it was caused by the SP Ban plugin, which appears to be incompatible with PHP 7. Disabling it got things working again. Here's the error log in case it's useful:

[01-Feb-2017 19:16:15 UTC] PHP Fatal error: Uncaught Error: Call to undefined function ereg() in /home/bbfuture/public_html/wp/wp-content/sp-resources/forum-plugins/ban/library/sp-ban-components.php:41

Stack trace:
#0 /home/bbfuture/public_html/wp/wp-content/sp-resources/forum-plugins/ban/library/sp-ban-components.php(20): sp_ban_check_banned(Array, '24.73.185.86')
#1 /home/bbfuture/public_html/wp/wp-content/sp-resources/forum-plugins/ban/sp-ban-plugin.php(154): sp_ban_do_check_bans()
#2 /home/bbfuture/public_html/wp/wp-includes/class-wp-hook.php(298): sp_ban_check_bans('')
#3 /home/bbfuture/public_html/wp/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#4 /home/bbfuture/public_html/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#5 /home/bbfuture/public_html/wp/wp-includes/template-loader.php(12): do_action('template_redire...')
#6 /home/bbfuture/public_html/wp/wp-blog-header.php(19): require_once('/home/bbfuture/...')
#7 /home/bbfuture/public_html/index.php(4): require('/home/bbfuture/...')
#8 {main}
thrown in /home/bbfuture/public_html/wp/wp-content/sp-resources/forum-plugins/ban/library/sp-ban-components.php on line 41

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Feb 1, 2017 - 2:59 pm
Quote

Thanks. I will open a ticket on this so we can get it fixed up. We are working a few php 7.1.1 issues which did not show themselves in 7.0.x at the moment.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Chris Johnston
Rookie
Free Members
Offline
Feb 15, 2017 - 12:22 pm
Quote

Discovered that the Simple:press Admin Bar plugin seems to be incompatible with PHP 7.1. Crashed the entire forum until I either disabled the Admin Bar plugin or switched the server back to PHP 7.0.

Fatal error: Uncaught Error: [] operator not supported for strings in  /wp-content/sp-resources/forum-plugins/admin-bar/library/sp-admin-bar-components.php:93 Stack trace: #0  /wp-content/sp-resources/forum-plugins/admin-bar/library/sp-admin-bar-components.php(37): sp_GetAdminsQueuedPosts() #1  /wp-content/sp-resources/forum-plugins/admin-bar/sp-admin-bar-plugin.php(157): sp_AdminBarGetWaiting() #2  /wp-includes/class-wp-hook.php(300): sp_admin_bar_get_waiting('group') #3  /wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #4  /wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5  /wp-content/plugins/simple-press/forum/content/sp-template-control.php(87) in  /wp-content/sp-resources/forum-plugins/admin-bar/library/sp-admin-bar-components.php on line 93

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626