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
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
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
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.
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
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.
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/20204:17 PM.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
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?
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
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.
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/20204:02 PM. Reason: Added Comment
Blue Man Group There is no such thing as stupid questions. Just stupid answers
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/20204:04 PM.
Blue Man Group There is no such thing as stupid questions. Just stupid answers