• kasidya

    (@kasidya)


    Hi, I’ve been using this plugin for almost 2 years now and this has never happened. For the last few days, i have not been able to upload the profile picture for users. But I thought I’ll create a thread for that later. But today my website gave a fatal error due to the plugin. I deactivated every other plugin to make sure that this is the one causing issues. The error I am getting is this:

    Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in public_html/wp-content/plugins/ultimate-member/includes/core/class-user.php on line 2

    It broke the website and I had to disable all the plugins. Then when I am trying to reactivate the plugin I am getting the above message.

    Please help. I don’t know how to go about it. I really want to keep using this plugin. Thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I had the same problem on one of my website.
    The problematic file was edited by a malware that added some code at the beginning of the file.

    Simply edit the file specified in the error log and remove whatever you find between “<?php” and the word “namespace”.

    • This reply was modified 9 months, 4 weeks ago by  luigipulcini.
    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @kasidya,

    Can you please check the class-user.php file in public_html/wp-content/plugins/ultimate-member/includes/core/ folder and make sure that you don’t have any code between <?php and the “namespace” declaration.

    Regards.

    Hi, thanks a lot for replying. Yes, there was a big bunch of code between <?php and the “namespace” declaration. I downloaded your plugin to check the original file and saw the irregularities. For now, I uploaded the new class-user.php file (the one I downloaded from your plugin) on my server and it is working fine so far. However, I need to know how it happened. Is it some sort of a malware? And if it is, how can I prevent it from spreading and infecting my files?

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @kasidya,

    What version of the plugin you’ve had installed?
    Can you please show us this code so we can check it.

    Let us know.
    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GETTING A FATAL ERROR’ is closed to new replies.