Support » Plugins and Hacks » [Resolved] Jigoshop upgrade to 1.9.1 fatal error

[Resolved] Jigoshop upgrade to 1.9.1 fatal error

  • I’m getting a fatal error on one of my client’s sites after upgrading to Jigoshop 1.9.1.

    Parse error: syntax error, unexpected T_STRING in /home/(username)/(domain name)/wp-content/plugins/jigoshop/plugins/jigoshop-web-optimization-system/jigoshop-web-optimization.php on line 32

    I saw another post from someone having this problem and the solution was to upgrade to PHP 5.3 or higher. We were using 5.3 already. I upgraded to PHP 5.4 just in case. I’m getting the same error.

    I have a dev version of the site set up and it upgraded just fine (also using PHP 5.3).

    Is there anything else that could be causing this?


Viewing 15 replies - 1 through 15 (of 19 total)
  • I had this in my dev site (before I decided to rebuild) and had to use the db to disable the plugin before getting into admin to re-enable.

    Hi Teri,
    Are you sure about PHP 5.3 version? This error definitely is related to that. If it’s still the case – please provide server access details via support@jigoshop.com and we’ll check it out for you.

    I just commented that line in jigoshop-web-optimization.php. My client is on shared hosting on PHP 5.2.17

    Is not the ideal solution as we lose the optimization of CSS and JS but at least the shop is functional until the host will upgrade the php on the server.


    Would be nice to test phpversion and only if the test pass for PHP 5.3 enable the optimization, otherwise let the shop as it was before.

    Just to follow up, this was an issue with PHP that the webhost needed to resolve. Thanks for quick replies.

    Plugin Author Jigoshop Support – Paul


    Jigoshop Support Rep

    Hi Teri,

    No problem, good to hear that it’s all sorted.

    Hi, just uploaded copy of site to HostGator and getting the same error message. Checked and it has PHP 5.4.28 installed.

    Parse error: syntax error, unexpected T_STRING in /home2/cpenman/public_html/wp-content/plugins/jigoshop/plugins/jigoshop-web-optimization-system/jigoshop-web-optimization.php on line 32

    Any suggestions?

    Hello everyone, i resolve the Jigoshop problem “Parse error: syntax error, unexpected T_STRING in /home/(username)/(domain name)/wp-content/plugins/jigoshop/plugins/jigoshop-web-optimization-system/jigoshop-web-optimization.php on line 32” downloading this version http://downloads.wordpress.org/plugin/jigoshop.1.8.6.zip and with Filezilla upload this folders to server:

    re-writting everythin

    – admin
    – assets
    – classes
    – trunk
    – winget

    and finally all the files in root of Jigoshop, down the /winget folder. The result it’s shop iqual before error. All are same than before. Sorry my bad english. I hope to help all of you

    any questions contac. thanks to the community.

    You practically reinstalled 1.8.6. version. See this post for problems and fixes: http://www.drafie-design.nl/another-fix-for-jigoshop/

    Even the problem of “line 32” can have a more elegant solution from Jigoshop… They can add their code in this way:

    if (!defined('PHP_VERSION_ID')) {
        $version = explode('.', PHP_VERSION);
        define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
    if (PHP_VERSION_ID > 50300) {
    new \Jigoshop\Web\Optimization();

    In this way the plugin will check itself the php version of the server and will activate the new web optimization system only on server which support this. The shops builded on lower version will works as in previous versions, without optimization….

    hello Ciprian Dracea, thank for present another solution to this problem. I going to read it. But i prefer previous version of Jigoshop with Web\Optimization working.


    I really doubt that there is any method for making optimization to work on PHP < 5.3. The only solution is to upgrade PHP.

    By overwriting those folders practically you have reinstalled 1.8.6. version, letting the other folders from 1.9.x version to stay orphaned on your server. In the files copied now on your server isn’t any call to /jigoshop/plugins/jigoshop-web-optimization-system/jigoshop-web-optimization.php

    Because there isn’t any call, the file is never loaded so the error isn’t triggered.

    In other words, instead of commenting a line, you commented all Web Optimization System, making it inaccessible.

    Is easy to check – go in your dashboard at Jigoshop -> Settings, if web optimization is active, the last tab from settings need to be “Web Optimization System”, if this tab not exist… my above considerations are right.

    It’s just temporary solution – new version of jigoshop will use more of PHP 5.3 features. Best option is to simply upgrade to 5.3 – as it’s there since 2009, all hosting providers should be able to upgrade already (http://php.net/releases/)


    I agree with you, better is to upgrade php (and if you read my article you see that we already upgraded php). But sometimes simply is not possible and you risk to affect exactly those people who’s have shops based on Jigoshop for the beginning. People who’s bought plugins for Jigoshop which may not works in php 5.3.

    I know that is not your responsibility, but is not so hard for you to preserve the backward compatibility. As it was the case of 1.9.5. Why to use anonymous functions when is so simple to define first those functions? Why to not add few lines to verify if the server support a new feature, if this feature aren’t really essential for the functionality of the shop? Sometimes will not be possible, but when it is will keep close the users until they will be capable to update their servers.

    Thank you very much for your answer, I really appreciate your work,

    It’s just sort of preparation for changes in Jigoshop 2.0 – there will be much more improvem]ents and we hope to make our users ready for them

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] Jigoshop upgrade to 1.9.1 fatal error’ is closed to new replies.