Sounds like you don't have an upgrade check list.
Error: syntax error, unexpected ')', expecting variable (T_VARIABLE)
is an indication that a plugin (themes are plugins - contributed) or any customizations
to core code is not compatible with the required version of PHP + extensions.
You are not using git .. too bad .. as the first step I would perform is an
update to the 4.1 to get it to the highest available for that version which is 4.1.10+
That would acquire not only fixes but security updates.
If that failed for some reason, you're not gonna be able to do a 4.2 upgrade.
A site under git versioning means no moving parts prior to any update or upgrade.
Code directory stays where it is ... no copy back etc.
Git wlll also show customizations/hacked core code.
Gerd? What the heck is that?
Login as admin, Server, Environment check.
Update component.
Set drop down pick list for next highest version of Moodle.
Any Reds or Yellows?
Address those before going anything more.
Next, check plugins from moodle.org plugins.
(you said you did this)
There is a command line only script in admin/cli/ called 'uninstall_plugins.php'.
It has an option to list all contributed plugins. There is your list to check
moodle.org plugins.
It will also show custom code that it does not recognize ... RED FLAG.
Can't help ya there ... but is definitely an area for investigation prior to upgrade.
Other things one might want to do ...
From admin/cli/ run check_database_schema.php
One might be surprised as to what has changed DB wise - crept in but didn't cause
moodle to whoopee!
Can an upgrade be done via command line?
Sure can ... much preferred as it takes web service out of the loop and it's
just your php taking to your DB.
Then there are php settings ... max_input_vars, time for a script to run, memory
a script can consume.
'SoS', Ken