Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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
Joined: Apr 2004
Posts: 1,973
Likes: 154
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,973
Likes: 154
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
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 16,366
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,366
Likes: 126
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, 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!
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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
Joined: Apr 2004
Posts: 1,973
Likes: 154
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,973
Likes: 154
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
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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
Joined: Jun 2006
Posts: 16,366
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,366
Likes: 126
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.
Attachments
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, 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
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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 4:17 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,366
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,366
Likes: 126
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, 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!
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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
Joined: Jun 2006
Posts: 16,366
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,366
Likes: 126
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, 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!
Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
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 2:16 AM.
1 member likes this: Ruben
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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 4:02 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 6,628
Likes: 85
Joined: Dec 2003
Posts: 6,628
Likes: 85
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 4:04 PM.

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

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Not allowing attachment over 2m
by ehill - 12/03/2024 3:16 PM
New Admin Here
by SenecaFlyer - 12/02/2024 4:14 PM
Post Counts zeroed out
by Baldeagle - 11/03/2024 3:05 PM
Who's Online Now
0 members (), 1,448 guests, and 60 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)