I updated to PHP 7.2 and when i go inside the forum appears: "Cannot use string offset as an array"
If I go, instead, in a specific topic, it works.
Any help?
Tks!
SMF 2.0.15 does not support PHP 7.2. Downgrade to version 7.1
Quote from: @rjen on July 04, 2019, 12:24:44 PM
SMF 2.0.15 does not support PHP 7.2. Downgrade to version 7.1
1a) Tks!
1b) I downgraded to PHP 7.1, but I still receive the same error message;
1c) Should I use CGI or FastCGI?
2) I have other 2 forums and I upgraded to 7.2 and they work correctly (very strange)
What should I do? (I really have no idea, tks)
1- SMF 2.0.x does not support php 7.2, as already stated.
2- If the site is still throwing the same error, then you probably didn't actually apply the step-down to 7.1
3- if the other sites work without errors, then they are not actually running 7.2
Quote from: Kindred on July 04, 2019, 01:08:03 PM
1- SMF 2.0.x does not support php 7.2, as already stated.
2- If the site is still throwing the same error, then you probably didn't actually apply the step-down to 7.1
3- if the other sites work without errors, then they are not actually running 7.2
1 - Yes, ok, received :)
2-3 - It means that the downgrade has not done correctly?
But in the control panel it appears done, it states 7.1
Update
In the guide of my provider, I noticed that I can change the PHP version in two ways:
1) by admin panel of my domains;
2) by .htaccess file
What I have done:
a) I downgraded (by admin panel) my forums B and C to 7.1 FastCGI, even if the already worked with 7.2 FastCGI--> everything ok;
b1) I modified the .htaccess file for forum A to PHP 5.6 and now it works--> but with PHP 7.1 it doesn't work--> I cannot understand the reason :(
b2) Then I tried to use PHP 7.0 with .htaccessfile and it works--> so the problem is only with versions 7.1 and 7.2
Can someone help me to understand the reason?
Tks for your help.
Now the website works (with 7.0), but I'd like to understand where's the problem.
I suspect it may be a mod that has a problem with php 7.1. What mods do you have installed?
1. SimplePortal 2.3.3
2. Google Analytics Code 1.4
3. SMF 2.0.8 Update 1.0
4. Subject length on Board Index 1.3
5. Simple Audio Video Embedder 4.5.3a
6. Topic Solved 1.1.1
7. Bookmarks 2.3
8. Started By Column 1.4
9. Custom Board Sort 1.0.2
10. Avatars on Board/MessageIndex 1.7
11. Guest Attachment Preview 1.0.1
12. Users Online Today 2.0 RC4
13. Simple Spoiler 1.0.2
14. SMF 2.0.12 Update 1.0
15. Info Center Permissions 1.0
16. Sitemap 2.2.0
17. Newsletter Pro 2.0.7
18. SMF 2.0.14 Update 1.0
19. SMF Activity Stream PRO Mods Integration 1.0
20. AGL_management 1.0
21. SMF Multi Quote 1.1.3
22. Menu_Icons 1.0
23. [BBCode] Blink 1.0
24. Remove Post Modified Time 1.2
25. Footnotes 1.08
26. Menu Order 0.2.6
27. Float BBCODE 1.0.2
28. Who Downloaded Attachment 1.0.5
29. SMF 2.0.13 Update 1.0
30. Advanced Topic Prefix Mod 3.0
31. Countdown BBCode 2.0.1
32. Hide Signatures from Guests 2.0
33. Inuitive Age 1.0
34. Contact Page 4.0
35. SMFPacks Likes Pro Mod 1.3.6
36. SMF Wiki {version}
37. Stars And Badges 2.2
38. SMF 2.0.15 Update 1.0
39. Login Form Fix 1.0
40. Simple Audio Video Embedder 4.3
41. Fix Firefox 8.0 download problems 1.0.0
42. SMF 1.1.19 / 2.0.6 Update 1.0
43. SMF 2.0.1 Update 1.0
44. SMF 2.0.2 Update 1.0
45. SMF 2.0.3 Update 1.0
46. SMF 2.0.4 Update 1.0
47. SMF 2.0.5 Update 1.0
48. SMF 2.0.7 Update 1.0
49. Improved Displayed Times WOT Mod 1.0
50. SMF 1.1.20 / 2.0.9 Update 1.0
51. SMF 1.1.21 / 2.0.10 Update 1.0
52. Topic Viewers 1.0
53. Order Custom Profile Fields 1.1.1
54. SMF 2.0.11 Update 1.0
55. Avatars on Board/MessageIndex 1.6
56. Simple Audio Video Embedder
What is the EXACT error you get when you use 7.1?
Do you get any errors in the log? If so which?
Difficult to pInpoint the culprit without more details...
Quote from: Kindred on July 04, 2019, 03:40:25 PM
What is the EXACT error you get when you use 7.1?
In the index of the forum I see ONLY this message: Cannot use string offset as an array
And I don't see any board.
Quote from: @rjen on July 04, 2019, 03:41:15 PM
Do you get any errors in the log? If so which?
Difficult to pInpoint the culprit without more details...
In the log I see these 4 errors when I try to use PHP 7.1.
The page the errors come from is: https://mydomain.com/index.php?action=forum
1) 2: Invalid argument supplied for foreach()
File: /Themes/default/index.template.php
Line: foreach ($context['menu_buttons'] as $act => $button)
2) 8: Undefined index: menu_buttons
File: /Themes/default/index.template.php
Line: foreach ($context['menu_buttons'] as $act => $button)
3) 8: Undefined index: show_pm_popup
File: /Themes/default/index.template.php
Line: var smf_charset = "', $context['character_set'], '";', $context['show_pm_popup'] ? '
4) 2: Illegal string offset 'value'
File: /Sources/abm_code.php
This refers to Avatars on Board/MessageIndex MOD
Line: foreach($abm_id as $abm['value'][]) {}
There you go: avatars on board mod does not play nice with php 7.1
Yeah, I think I had to modify that mod to get working on my forum sites.
Quote from: @rjen on July 04, 2019, 04:06:16 PM
There you go: avatars on board mod does not play nice with php 7.1
Tks!
Quote from: vbgamer45 on July 04, 2019, 04:07:16 PM
Yeah, I think I had to modify that mod to get working on my forum sites.
Do you remember what you did?
Not off hand was a while ago.
Ok I solved it: I updated the mod from 1.7 to 2.0.
Version 2.0 - Dec 28, 2017
- Fixed: Illegal string offset 'value' (due > PHP 7.1)
- Added: Proxy for external avatar urls
Tks to all for the fast help 💙