Previous Thread
Next Thread
Print Thread
Hop To
7.7.4 error after php upgrade to php 7.0
#263885 05/25/2020 1:10 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
Just migrated to php7.0
Getting this error:
Code
Parse error: syntax error, unexpected ';', expecting variable (T_VARIABLE) or '{' or '$' in /home/freaksfo/public_html/libs/html.inc.php(1988) : eval()'d code on line 1
whenever I use the post editor. if I edit a post or use the full editor.
also sometimes when posting a new topic.

Note.
If I revert back to php 5.4 no error.
What do I look for.?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263887 05/25/2020 3:03 PM
Joined: Apr 2004
Posts: 1,697
Likes: 49
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,697
Likes: 49
It looks like the php 7 on your server may have the EVAL language construct blocked by a misconfigured or overzealous security suite on the server. (uncommon)
https://www.php.net/manual/en/function.eval.php

https://stackoverflow.com/questions/5743385/php-eval-function


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263889 05/25/2020 3:50 PM
Joined: Jun 2006
Posts: 15,938
Likes: 27
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,938
Likes: 27
I'm wondering if Suhosin is installed on the server; it'd attempt to disable eval... If detected there should be a notice in the Control Panel at CP -> Tools & Information -> PHP Info -> Suhosin Info


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: 7.7.4 error after php upgrade to php 7.0
Gizmo #263890 05/25/2020 3:58 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
in php info selecting the suhosin tab shows it disabled for all three columns.
I even turned off mod security.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263891 05/25/2020 4:09 PM
Joined: Apr 2004
Posts: 1,697
Likes: 49
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,697
Likes: 49
Check your BBCode Custom Tags.
Control Panel > Content Rebuilder > Custom Tag Editor

You may have a tag with invalid markup or regex (incomplete code, a stray $; PHP7 is far more strict with errors).

Confirm that each of your custom tags are legit regex and HTML:
1.Disable all of them and then test your post editor to trigger the error.
2.Enable each one at a time. One by one, until the error returns.
3.Review that custom tag. Make the necessary corrections to it, or keep it disabled, or remove/delete it completely.


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: 7.7.4 error after php upgrade to php 7.0
isaac #263892 05/25/2020 5:00 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
Tried it no luck.
In fact I did find a broken graemlin it was truncated with just a ,p instead of a jpg.
The name was to long so I renamed it .
Since the error is line 1988 of the graemlins section of html.inc.php but no luck.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263893 05/25/2020 5:13 PM
Joined: Jun 2006
Posts: 15,938
Likes: 27
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,938
Likes: 27
Unfortunately, if it is not an issue with modified code it sounds like your system isn't allowing the use of eval() which means there isn't much we can do; eval is used all over smarty which is our template engine so there isn't a real *fix* other than to figure out why your system isn't allowing use of eval.

We have tested UBB.threads with PHP7.0-7.4.6 without any issues with eval.

Attached Files eval.png

I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
1 member likes this: isaac
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263894 05/25/2020 5:14 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
graemlin section appears that all the original stock ones have been deleted or changed by someone.
Could that be it?

at the header:
Code
Graemlins are the smiley images available for use in posts. You may change the image for any of the Graemlins by using the browse box next to the graemlin. The stock Graemlins may not be removed, nor may you change the UBBCode or trigger text.
Note: Deleting a Graemlin may result in broken images appearing in posts in your forums. 

Last edited by Ruben; 05/25/2020 5:17 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263895 05/25/2020 5:17 PM
Joined: Jun 2006
Posts: 15,938
Likes: 27
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,938
Likes: 27
Originally Posted by Ruben
graemlin section appears that all the original stock ones have been deleted or changed by someone.
Restoring all code, other than images provided in the package, to stock would be a start, we do not support any 3rd party modifications to coding... However, the line in your bug report is an eval which would indicate an issue with eval on your system.

Is PHP 7.0 the latest PHP7 available to your account on the machine? PHP7 was released in 2015 and is not even a supported build any longer; most hosts are running at least PHP7.2 from my experience... I'd run whatever the latest is, if there is a newer build available to you. I would also search any available php.ini files for "eval" and see if something is present that may be causing some sort of filtering.

Is this section of code the only area where eval is causing problems?


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263897 05/25/2020 5:29 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
When I upgraded I did not mod any of the files,
To restore the stock graemlins.would be hell.
I would probably need to turn off auto increment to import the original 18
since id 1-18 are not there

Time to contact the host I guess.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263898 05/25/2020 5:30 PM
Joined: Jun 2006
Posts: 15,938
Likes: 27
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,938
Likes: 27
Again, Stock Code != Stock Images.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263903 05/26/2020 3:15 AM
Joined: Jul 2006
Posts: 106
Likes: 1
Member
Offline
Member
Joined: Jul 2006
Posts: 106
Likes: 1
Originally Posted by Ruben
What do I look for.?
You are looking for a dollar sign in the UBBCode of one of your Graemlins:
Images & Icons => Graemlins

The dollar sign triggers the eval() function and can lead to an error message if the code contains a bad syntax. Newer versions of PHP have a much stricter syntax.

Last edited by Philipp; 05/26/2020 3:16 AM.
1 member likes this: Ruben
Re: 7.7.4 error after php upgrade to php 7.0
Philipp #263904 05/26/2020 1:25 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
Originally Posted by Philipp
Originally Posted by Ruben
What do I look for.?
You are looking for a dollar sign in the UBBCode of one of your Graemlins:
Images & Icons => Graemlins

The dollar sign triggers the eval() function and can lead to an error message if the code contains a bad syntax. Newer versions of PHP have a much stricter syntax.

This was exactly what the problem was that I found by trial and error.
The ubbcode assigned for three of them was

burnt$
$$
$$$

I wish I would have read this first. It would have saved a lot of time.
At least this confirms it was the problem
Thank you Phillip

Issue resolved.

Last edited by Ruben; 05/26/2020 5:02 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: 7.7.4 error after php upgrade to php 7.0
Ruben #263905 05/26/2020 5:01 PM
Joined: Dec 2003
Posts: 6,144
Likes: 21
Ruben Online Yawn OP
OP Online Yawn
Joined: Dec 2003
Posts: 6,144
Likes: 21
To Gizmo and Isaac,
Move this post to non bug if you deem required but I see two issues.
1:) If the stock image per the note in the header says they are required then do not allow deletion.
2:) If the $ inserted in the ubbcode breaks the site do not allow it.

Last edited by Ruben; 05/26/2020 5:04 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
[NOTABUG] Report Post bug..
by Morgan - 07/05/2020 1:48 PM
Trial Subscription question.
by Ruben - 07/03/2020 2:34 PM
Unread posts no longer tracked per user...
by KirkW - 06/16/2020 12:21 AM
Max Image file size upload
by jjjjj - 06/10/2020 10:25 PM
Error on Inert into POSTS
by jjjjj - 06/07/2020 8:09 PM
Who's Online Now
3 members (Ruben, Gizmo, 1 invisible), 84 guests, and 43 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4