Only variables can be passed by reference error

Permalink
Hello,

I have had the website installed and running perfectly fine for a while now but when I'm in my dashboard and I go to Files or Members I get the following error -

An unexpected error occurred.
Only variables can be passed by reference

Does anyone know why and/or how to fix this because at the moment I am unable to upload any files to the website. I am running version 8.2.1

Many thanks,
Joshua

 
jero replied on at Permalink Reply
jero
I think the first thing you ought to do is turn on debugging so that you can see which piece of code is causing this. Go to dashboard, system & settings and under ENvironment, click debug and make sure that "Show the debug error output" is set. Save the changes and then go back to the file manager and if it crashes, you'll get a full traceback of where it went wrong.

The error you're referring to indicates a programming error - it would appear that a literal value has been passed to a function which tries to update it and declares an error because trying to redefine 1 as something else isn't allowed. Perhaps you have a new package installed that's somehow causing this?
joshuabrand replied on at Permalink Reply 1 Attachment
Thanks for your reply Jero, I have done this and the output is huge.

I have attached it and would be very grateful if you could take a look if you understand it and see if you can see what is going wrong.

Many thanks
jero replied on at Permalink Reply 1 Attachment
jero
What you've send appears to be PHP source code - which I would not have expected to see. It makes me wonder if there is something a bit strange with the way your web server is configured. You should see something similar to the attached when the exception occurs. Is this what you see?
joshuabrand replied on at Permalink Reply 1 Attachment
Hi Jero,

It is something similar I see, I've attached a screenshot this time.
jero replied on at Permalink Reply
jero
OK, so it's showing a compile error, which basically means the PHP is broken. I doubt that you've edited any source files, so my money is on you having ASP tags enabled in your PHP configuration. An ASP tag is one of <% %>

Note that the search template is barfing up on the first line that starts <%, which it really should be ignoring since it's not within a <?php tag.

So, you need to disable ASP tags, which you can do by adding a php,ini or .user.ini file in your root folder which should contain this:

asp_tags = Off