Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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 3:16 AM.
1 member likes this: Ruben
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
2 members (Havenofsobriety, rootman), 624 guests, and 106 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.0
(Preview build 20230217)