Jump to content

Community not working after upgrading to PHP 8.x


adekk
Go to solution Solved by Jim M,

Recommended Posts

Hi,

I googled other threads here but it wasn't helpful. We upgraded server to 8.0 to install new community after doing that our site stopped working properly.

Forums are not loading. Here's the error:

AH01071: Got error 'PHP message: PHP Fatal error:  Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /var/www/mysite/public_html/uploads/template_6_ad9ae6e9ced8695954ac11f917afdfac_global.php on line 1211'

We tried 8.0, 8.1, 8.2. Same error.

Only on older version of invision community we didn't have any issues (PHP 7.4). Since we upgraded to 8.1 and we bumped community version to the latest - there's no way back.

What can we do to fix this issue:

I tried:

  •  reverting templates, using default theme - didn't help
  • disabling plugins (we don't have many of them)
  • clearing cache in Settings / Support
  • turning off Cloudflare (didn't help)

It looks like issue with PHP but not sure why. 

Do you have any tips for that?

 

Link to comment
Share on other sites

3 minutes ago, adekk said:

AH01071: Got error 'PHP message: PHP Fatal error:  Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /var/www/mysite/public_html/uploads/template_6_ad9ae6e9ced8695954ac11f917afdfac_global.php on line 1211'

The mentioned file is not a standard Ipb one a.f.a.i.k. 

The issue is that the ternary operators are deprecated without parentheses. The solution is to wrap them in parentheses.

 

7 minutes ago, adekk said:

disabling plugins (we don't have many of them)

Did you disable all the apps as well?

What version of Ipb do you have btw?

Link to comment
Share on other sites

I have 4.7.5. 

Yes. I tried to disable everything. 

I read there is some kind of maintenance mode. 

Also - I see erorrs are here: /uploads/template_6_ad9ae6e9ced8695954ac11f917afdfac_global.php

In uploads folder. Do you know if this is some kind of cache I should be able to rebuild? 

Link to comment
Share on other sites

Yes. I found it. So if I turn if off. Another clue:

 AH01071: Got error 'PHP message: PHP Fatal error:  Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /var/www/site.com/public_html/system/Theme/Theme.php(885) : eval()'d code on line 1210', referer: https://site.com/

So it looks like theme. But I switched to default. I don't have special themes.

 

Link to comment
Share on other sites

Are any custom templates being inserted into the theme?

We can take a further look if you provide us access:

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Link to comment
Share on other sites

We got son inserts to templates but when we use default theme all insers are gone? 

Access details on file? Not sure I understand. In client's area I don't see anything like that. My license is active (we even did purchase this month).

I'll be happy to give you everything on Monday (because probably today it can be problematic for many of us).

 

Link to comment
Share on other sites

9 minutes ago, adekk said:

Access details on file? Not sure I understand. In client's area I don't see anything like that. My license is active (we even did purchase this month).

I'll be happy to give you everything on Monday (because probably today it can be problematic for many of us).

 

You would want to go to Client Area -> Manage Purchases -> click your license -> scroll down to "Review/Update Access Information" and update the access details there so we ca access your community.

Link to comment
Share on other sites

2 minutes ago, adekk said:

I used option to create account in Support section. Account was there. But I just created it again (same method). Account is there.

 

You would need to provide us in the Client Area the information which is displayed on the screen there. We would not get those credentials otherwise.

Link to comment
Share on other sites

Of course. I created account once again and updated details there with new account login and password. I think previous was wrong - there were type when pasting username. Right now, the one you have should be valid.

Link to comment
Share on other sites

But can I do it for one user? I need to turn it off globally? 

I see it's not set. 

And there was one login:

Logged in from a new device but did not complete two-factor authentication

I changed it for group (I mean - I understand if I uncheck admins - existing accounts are not affected).

Edited by adekk
Link to comment
Share on other sites

OK. Where's the catch. I'm there, at main site I'm using "Default theme". I got this error all the time.

So I need to change theme in preferences (account?). Not sure I understand.

I thought that changing it here is also OK.

Could contain: Coat, Clothing, Blazer, Jacket, Long Sleeve, Sleeve, Pants, Belt, Accessories

 

 

Can you open Forums?

 

Link to comment
Share on other sites

2 minutes ago, adekk said:

OK. Where's the catch. I'm there, at main site I'm using "Default theme". I got this error all the time.

So I need to change theme in preferences (account?). Not sure I understand.

I thought that changing it here is also OK.

Could contain: Coat, Clothing, Blazer, Jacket, Long Sleeve, Sleeve, Pants, Belt, Accessories

 

 

They would both do the same. I was encountering a 500 Internal Server Error when I logged in so did it via the ACP

Link to comment
Share on other sites

When you see 500 - it's that error. But after changing to Default theme - it's not resolved. Could you click on this link: https://max3d.pl/forums/

I switched to Default theme. I even set it for members as default. Not helping. Same issue all the time.

The problem is. Everything looks normal except FORUMS. 

Second issue with same error: opening main site - it's working for second time (if you go there at first - you see 500 error). Refresh - it works.

For FORUMS - nothing is working. 

Edited by adekk
Link to comment
Share on other sites

9 minutes ago, adekk said:

When you see 500 - it's that error. But after changing to Default theme - it's not resolved. Could you click on this link: https://max3d.pl/forums/

I switched to Default theme. I even set it for members as default. Not helping. Same issue all the time.

The problem is. Everything looks normal except FORUMS. 

Second issue with same error: opening main site - it's working for second time (if you go there at first - you see 500 error). Refresh - it works.

For FORUMS - nothing is working. 

Have you modified any files here? Do you have any custom redirects/rewrites here that would cause something here on the refresh? Could you please add SFTP/FTP to the access details in the Client Area?

Link to comment
Share on other sites

Access to SFTP/FTP will be problematic.

No I didn't change any files. I even checked yesterday files with downloaded verison of the latest version. They are the same. 

Error is here (I turned off templates caching)

 [proxy_fcgi:error] [pid 15603] [client 89.67.16.19:24314] AH01071: Got error 'PHP message: PHP Fatal error:  Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /var/www/site.pl/public_html/system/Theme/Theme.php(885) : eval()'d code on line 1210',

Theme.php is the same on my server. I can give you anything but right now access is available only with SSH (it's VPS). 

But let me know what do you think I should check. I can give you everything (or check everything). 

 

I can try to do one thing. Unzip Community and overwrite all files on my server from the package. I was just comparing size. I can do this.

Edited by adekk
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...