• Like others also got the error with version 3.0.0 update:

    Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/******/public_html/wp-content/plugins/ewww-image-optimizer/common.php on line 1764

    Now that’s a wacky error ??

    Had a look at the relevant code and think modifying the file

    /ewww-image-optimizer/common.php

    As follows gets rid of the parse error.

    Change lines 1764, 1772, 1781, 1799 and 1813,

    From

    if ( ! defined( 'DOING_AJAX' ) || empty( DOING_AJAX ) ) {

    To

    if ( !defined('DOING_AJAX') || ! DOING_AJAX ) {

    Not sure if it has any impact on functionality, just quickly getting a fix. I’ve only tested this on localhost so far, putting the info out there quickly for others.

    David Law

Viewing 15 replies - 1 through 15 (of 17 total)
  • I need help to fix this error

    Parse error: syntax error, unexpected ‘)’, expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /home/hillsay/public_html/wp-content/plugins/ewww-image-optimizer/common.php on line 1764

    I just got the same error and need to fix it. I only design sites and have NO CLUE how to get to the “lines” to fix this issue. Please help.

    Thread Starter David Cameron Law

    (@seo-dave)

    If you can’t access your WordPress Dashboard you have several options.

    1. Use an FTP program (like Filezilla: it’s free) to access your sites server and delete the EWW Plugin folder.

    Login via FTP, go to /wp-content/plugins/ and delete the folder /ewww-image-optimizer/

    Deleting a plugin folder deactivates the plugin and you gain access to your Dashboard etc… The plugin will be no longer on your site, find an older version from https://www.ads-software.com/plugins/ewww-image-optimizer/developers/ and reinstall.

    2. If you have a control panel to access your site and can delete files/folders via the control panel, use it instead of an FTP program to delete the above folder.

    3. Using an FTP program (or control panel) access /wp-content/plugins/ewww-image-optimizer/ and modify the file common.php as I described in my first comment. Easiest way to do this is download the common.php file, modify it in a text editor and reupload.

    4. I’ve uploaded a modified common.php file to https://stallion-theme.co.uk/ewww-image-optimizer.zip download it, unzip and upload the common.php file to /wp-content/plugins/ewww-image-optimizer/ either via FTP or a control panel. I added more details to a txt file in the zip file.

    Good luck.

    David Law

    Thread Starter David Cameron Law

    (@seo-dave)

    The bug appears to affect servers running PHP 5.3 and 5.4.

    The 3.0.0 update works fine on PHP 5.5, PHP 5.6 and PHP 7.0.

    My bug fix works in PHP 5.3, 5.4, 5.5, 5.6.26 and 7.0.11 on a localhost (server on a PC) install.

    David Law

    Plugin Author nosilver4u

    (@nosilver4u)

    Doh, empty() does not work on a constant, fix imminent.

    Plugin Author nosilver4u

    (@nosilver4u)

    just pushed 3.0.1 with the fix

    Plugin Author nosilver4u

    (@nosilver4u)

    sorry about that, 3.0.2 actually has the fix, the last one didn’t have any changes somehow

    SEO Dave nailed this fix.
    I am impressed!
    Thank you for posting. NEVER would have figured this one out otherwise.

    for:
    Parse error: syntax error, unexpected ‘)’, expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /********/public_html/wp-content/plugins/ewww-image-optimizer/common.php on line 1764

    As SEO Dave revealed… the fix is not in using a :: (as the error message suggests) … but in replacing the lines as he indicated. Very simple, really.

    I used FileZilla as my FTP tool. You can probably also do this from a file manager in your Host interface (usually cPanel).

    I copied the original file to my local system (and also copied that), before attempting the changes.

    The path in the error gives you the path to the file.
    example:
    ********/public_html/wp-content/plugins/ewww-image-optimizer/

    Use FTP software (like FileZilla) to log into your host and locate the file. (Once you get into “public_html”, you can just copy the path into the appropriate box.)

    Use a good “ASCII Text Editor” to open up the problem file (in this case <common.php>, at the above path).

    These are also known as “Plain Text Editors”. In MS-Windows the default ASCII Editor is usually “Notepad”. You may want to use something with better features, like “TED Notepad” I am running Linux Mint, and the “gedit” tool worked great, and even automatically highlighted the PHP code in color… making it much easier to read (I know nothing about PHP).

    The KEY is to locate the correct lines, which is usually easy to do, as a good editor will at least indicate what line you are on (usually in the status bar, along the bottom of the program window). Some will have an input box (withing the menu system) that will allow you to jump directly to a line.

    Just go to each line as Dave indicated, and copy/paste the “fixed” code he offered.

    Ummm…

    I am assuming you know to download the file via FTP to your local system, make a copy of that (to preserve the original), change the 1st file, and upload it back to your server.

    Once I found these instructions by Dave, I was able to “fix” my site in a few minutes.

    If you need help with FTP, there is LOTS of “How To” info on the web about that. It is a VERY handy skill to have. Be patient and keep chipping away at it till you get it right.

    As Always… Be careful what you click on… and what tasks you complete.

    As long as you do not delete anything on your Host server (except by replacing the damaged file with the fixed one), you should be fine.

    Once you are in the correct path on your server… DO NOT CHANGE THAT. (There could be other <common.php> files elsewhere in the WP system.)

    Hey guys, I plan on going the cpanel route and deleting the files. Will this be enough for me get to my wordpress dash of my site? And is there ANYTHING else I need to do? I plan on calling support to help me locate these files so I hope this will solve my problem.

    Thread Starter David Cameron Law

    (@seo-dave)

    Deleting the /ewww-image-optimizer/ folder is all you have to do to gain access to your Dashboard. WordPress automatically deactivates a plugin it can’t find.

    The plugin has been updated to v3.0.2 which includes the fixes I listed earlier.

    After deleting the /ewww-image-optimizer/ folder you can reinstall the plugin as you would any plugin IF you want to keep using it: the latest version works on PHP 5.3 servers.

    David

    Thread Starter David Cameron Law

    (@seo-dave)

    BTW if you aren’t sure where the /ewww-image-optimizer/ folder is, look at the error message (assuming you have one).

    From my error message

    Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/******/public_html/wp-content/plugins/ewww-image-optimizer/common.php on line 1764

    The important part is:

    /home/******/public_html/wp-content/plugins/ewww-image-optimizer/common.php

    The ***** part I edited as you should avoid sharing that part of the error online (might be your FTP login username).

    A lot of servers (not all) have the websites files under /public_html/…, some have it under /www/…

    Look at your error message and find your way through to /wp-content/plugins/ and delete the folder /ewww-image-optimizer/ (or if comfortable with modifying files etc.. use the other ways).

    There should only be one /ewww-image-optimizer/ folder on your server, so you can be pretty confident you are in the right location when you find it.

    If in doubt make a backup copy on your computer. If using FTP it’s a simple case of downloading the entire /ewww-image-optimizer/ folder on to your computer before you delete it on the server. If there was another folder with the same name (unlikely) you can reupload it.

    David

    I am terrified I may delete the wrong thing! Dave can we hop in a google hangout so I can share my screen with you and we can identify it? I know this may be out of the ordinary but I really need the help. ??

    Thread Starter David Cameron Law

    (@seo-dave)

    I’ve written a tutorial for deleting a faulty plugin folder using FTP, used EWWW Image Optimizer as the example: https://stallion-theme.co.uk/how-to-manually-delete-a-wordpress-plugin-using-ftp/

    The tutorial is designed for novice users, so if you want to use your control panel you should be able to compare the directory structure to confirm you are deleting the right folder.

    It’s really, really easy to do (when you know how :-)). Find the /ewww-image-optimizer/ folder under the directory /wp-content/plugins/, delete it. 99.9% of websites will only have one folder named /ewww-image-optimizer/. The 0.1% that have more than one have installed WordPress multiple times. Even if you delete the wrong one (from a second WordPress installation) all it does is deactivate the plugin: it’s not a big deal.

    If in doubt download the folder to your computer first (easy to do in Filezilla).

    David

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘EWWW Image Optimizer Parse Error expecting T_PAAMAYIM_NEKUDOTAYIM v3.0.0 Fix’ is closed to new replies.