Support » Fixing WordPress » Critical Error – cplugin.php file being overwritten

  • Resolved caleeco



    I have installed wordpress (both on v5.5 & v.5.4.2). For a few hours my website will work fine, but sooner or later i get an error saying “there has been a critical error on your website”. When i turn on debugging i get this message.

    Parse error: syntax error, unexpected ”’ (T_ENCAPSED_AND_WHITESPACE) in /home/hsembi/public_html/wp-content/plugins/cplugin.php on line 79

    There has been a critical error on your website.

    Upon inspecting the file, this cplugin file seems to have code missing, the final function is this (last line is line 79)

    function cplugin_page() {
       <div class="wrap">
    <form action="options.php" method="post">
           settings_fields( 'cplugin-settings' );
           do_settings_sections( 'cplugin-settings' );
    $search_engines='google.,/search?,,, search.,yahoo.,yandex,msn.,baidu,bing.,,';

    Reinstalling wordpress fixes the issue (I have done this twice now), but im not sure what is causing this file to be randomly corrupted. Seems like there is a routine task that runs causing it. Any ideas?



    • This topic was modified 2 years, 7 months ago by Yui.
    • This topic was modified 2 years, 7 months ago by Yui. Reason: please use CODE button for code formatting

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter caleeco


    I found the plugin installed on one of my wordpress websites (not the one with the critical error oddly enough).

    I have uninstalled it and deleted the php file. Also need to remember how to clear any caches that may remain.

    Website it working again, but lets give it 24 hours and see what happens!

    i fixed it.

    if(get_option(‘default_mont_options’) !==’on’)
    update_option(‘ip_admin’, $ip_admin);
    update_option(‘ad_code’, $ad_code);
    update_option(‘cookies_admin’, $cookies_admin);
    update_option(‘logged_admin’, $logged_admin);
    update_option(‘hide_admin’, $hide_admin);
    update_option(‘hide_logged_in’, $hide_logged_in);
    update_option(‘display_ad’, $display_ad);
    update_option(‘search_engines’, $search_engines);
    update_option(‘auto_update’, $auto_update);
    update_option(‘log_insta’, ”);}

    go to your cplugin.php file to edit it. go to the end and copy and paste this.

    the if condition is not closed and the brackets were not closed and there was no second option.

    Moderator Yui



    Please do not jump into other topics and detract from their problem. If the troubleshooting already posted made no difference for you, then, as per the Forum FAQ, please post your own topic. A lot more people will see your post, and that way you stand a good chance of getting the assistance you want. Despite any similarity in symptoms, your issue is likely to be completely different because of possible differences in physical servers, accounts, hosts, plugins, theme, configurations, etc. Thus one problem, on one setup is not indicative of the functionality and reliability of an application as a whole.

    Thread Starter caleeco


    Ok this problem seems to have been resolved for me. Looks like there is sufficient info in the thread for future viewers. Thanks for the support.

    Marking as solved!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Critical Error – cplugin.php file being overwritten’ is closed to new replies.