1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Piwik instalation problem on Hostgator

Discussion in 'General Scripting Chat' started by Darksider, Feb 25, 2014.

  1. Darksider

    Darksider Registered Member

    Joined:
    Jun 16, 2010
    Messages:
    81
    Likes Received:
    31
    Location:
    Europa
    I want instal piwik on Hostgator in the domain folder, but I get this error.Can somebody have a similar trouble and find solution? I would be very grateful for help.Thanks

    Error:

    Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home2/anthony/public_html/mydomain.com/piwik/index.php on line 11
     
  2. nikiobicata

    nikiobicata Regular Member

    Joined:
    Mar 4, 2011
    Messages:
    443
    Likes Received:
    365
    Occupation:
    IT Director
    Location:
    New York
    Home Page:
    From piwik forum:

    Make sure you restart the webserver after changing the PHP version. This error is usually because it's not running at least PHP 5.3.2

    Ask your host to upgrade your PHP version
     
    • Thanks Thanks x 1
  3. Darksider

    Darksider Registered Member

    Joined:
    Jun 16, 2010
    Messages:
    81
    Likes Received:
    31
    Location:
    Europa
    Thanks for the tips. I update my php version on Hostgator and all are ok.

    Solution:

    Open the site?s .htaccess file that you want to upgrade the PHP version in your favorite editor and add the following to top of the file:
    Code:
    # Use PHP 5.3
    AddHandler application/x-httpd-php53 .php
    suPHP_ConfigPath /opt/php53/lib
    Refresh your website and you should see in your PHP info that your are indeed now using PHP version
    5.3+. Hope this helps my fellow HostGatorers!
     
    • Thanks Thanks x 1