Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: lalulula on March 18, 2017, 12:06:31 PM

Title: Several Parse error: syntax error, please help me
Post by: lalulula on March 18, 2017, 12:06:31 PM
Hi, this is my forum (I am not allowed to post external links.....)
I had  SMF 2.0.6 , theme: SMF Default Theme - Curve
but I was encountering several Parse error: syntax errors on different parts of my forum, so I decided to upgrade to SMF 2.0.13

I'm affraid that didnt fixed the problem, so this are the errors I am getting now:


Parse error: syntax error, unexpected '}' in /home/...Sources/ManageMaintenance.php on line 872

Parse error: syntax error, unexpected '.' in /home/...Sources/Display.php on line 1399

Parse error: syntax error, unexpected '}' in /home/...Sources/Profile.php on line 764

Please help me out, I have no idea what to do :(
Title: Re: Several Parse error: syntax error, please help me
Post by: Bob Perry of Web Presence Consulting on March 18, 2017, 12:19:03 PM
More than likely an installed module causing that, can you post a snapshot of the error log showing those messages and a list of the modules you have installed?

Title: Re: Several Parse error: syntax error, please help me
Post by: lalulula on March 18, 2017, 12:44:59 PM
THANKS FOR BEING THERE :)

I am attaching some images.

The mods seems to be ok.

all the errors point to subs.php


I remember now that yesterday I run an antivirus to all my files, and found some errors that where fixed, maybe that altered some files and generated the problem?
Title: Re: Several Parse error: syntax error, please help me
Post by: Shambles on March 18, 2017, 01:46:29 PM
Looks like whatever you ran against your forum files has destroyed all occurrences of calls to the preg_replace_callback function.

Certainly that's the case in the 3 files you attached.

I'd upload a fresh set of files if I were you - who knows how many other files have been affected, or roll-back to any backups you may have kept.
Title: Re: Several Parse error: syntax error, please help me
Post by: Bob Perry of Web Presence Consulting on March 18, 2017, 01:49:37 PM
What steps did you do to upgrade to SMF 2.0.13? You may need to do a manual upgrade and re-install your modules using the large upgrade zip file if you used the patch method by clicking the link in package manager over and over...
Title: Re: Several Parse error: syntax error, please help me
Post by: lalulula on March 18, 2017, 02:09:40 PM
yes, thats what I did.... I would love to do a manual re-install of everything, do you know any step by step tutorial?
I am afraid to ruin my forum
Title: Re: Several Parse error: syntax error, please help me
Post by: Shambles on March 18, 2017, 02:16:44 PM
http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Title: Re: Several Parse error: syntax error, please help me
Post by: lalulula on March 18, 2017, 02:32:08 PM
thanks so much Shambles i'll do that :)
Title: Re: Several Parse error: syntax error, please help me
Post by: lalulula on March 18, 2017, 07:17:10 PM
thanks so much, you guys. I followed the instructions and now all is working well.
you saved me, thanks.