• Resolved worldless

    (@worldless)


    I had some similar PHP issues on 22-May-2018 ten days after the first one:

    [22-May-2018 20:31:26 UTC] PHP Parse error: syntax error, unexpected end of file in /public_html/wp-content/plugins/sucuri-scanner/src/fileinfo.lib.php on line 251

    Line 251 : && $filterby === 'directory'

                        /* check only directories */
                        if ($fifo->isDir()
                            && $filterby === 'directory'
                            && !$this->ignoreFolder($filepath)
                        ) {
                            $files[] = $filepath;
                            continue;
                        }
                    } catch (RuntimeException $e) {
                        SucuriScanEvent::reportCriticalEvent($e->getMessage());
                    }

    [22-May-2018 20:31:27 UTC] PHP Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) in /public_html/wp-content/plugins/sucuri-scanner/src/hardening.lib.php on line 78

    Line 78 doesn’t exit anymore and seems to have been updated but I guess it was referring to line 85 or so :

    public static function hardenDirectory($directory = '')

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter worldless

    (@worldless)

    I had another error on the same date. thought this might be related :

    [22-May-2018 23:06:18 UTC] PHP Warning: Error while sending QUERY packet. PID=19030 in /public_html/wp-includes/wp-db.php on line 1924

    Hello @worldless the errors from the first comment are produced by the PHP interpreter when the file is not fully read. There is no bug in the code that would cause this problem. I believe your web server, for some reason, was not able to read the entire file and when it passed it to the PHP interpreter the code was incomplete, that’s why it says “[…] unexpected end of file”.

    The second error is not produced by this plugin. That error is talking about packet loss in a SQL query. The plugin doesn’t make use of the database at all. You may want to investigate how much data is your website requesting from the data and/or increase the value of your max_allowed_packet setting.

    I think both errors are produced by a misconfiguration of some settings in your web server and database engine. I encourage you to pass this information to your hosting provider and see if they can do something to help.

    Thread Starter worldless

    (@worldless)

    Thanks yorman for the info,
    So it’s a server side error, huh ? ok. I thought it was another one of those plugin issues that’s why I reported it. if it was a temporary error then I guess I’ll let it go for now.

    I’ll mark this as resolved but I have a question out of curiosity:

    Sucuri suggested to have directory listing (and some other options) disabled in .htaccess using the following code:

    Options -Indexes

    and because the errors are related to directory, I was wondering to know if this might have something to do with the issue.

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