WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Statrix] fatal error (19 posts)

  1. wwhitlock
    Member
    Posted 5 years ago #

    Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE or T_CONST in /home/wsays/public_html/wp-content/plugins/statrix/statrix.php on line 355

  2. azzatron
    Member
    Posted 5 years ago #

    i'm getting a fatal error too, but nobody has replied to my thread yet here : http://wordpress.org/support/topic/194157?replies=1
    goodluck

  3. cronus3166
    Member
    Posted 5 years ago #

    Yeah I'm getting the same error :(

    Line 355 is:

    function printPages($itemsCount, $itemsLimit, array $additionalArgs = array()) {
    $pages = ceil($itemsCount / $itemsLimit);

  4. Iva Koleva
    Member
    Posted 5 years ago #

    Thank you all for the feedback.

    The problem is, that your PHP version is lower than 5.1. And PHP < v5.1 doesn't support typehints for array types.
    I am sorry that I've forgotten to put that in the installation manual.

    In the next version I'll remove the array typehints, so you will be able to use Statrix.
    Expect the next version later today. :)

  5. cronus3166
    Member
    Posted 5 years ago #

    LoL

    Curses, I had 5.0, the highest my server allows :(

  6. Anonymous
    Unregistered
    Posted 5 years ago #

    Outch, man, I have PHP version 5.05 but have seen this forum thread only AFTER the installation.
    Now everything seams to be dead. I'm sort of fucked up.

  7. Iva Koleva
    Member
    Posted 5 years ago #

    If your PHP version is lower than 5.1, you would not be able to activate the Statrix plugin at all. WordPress takes care about such situations.

    So the only problem Statrix could cause is unsuccessful installation of itself. It could not break your blog or anything, related with it. :)

    You could delete the Statrix unzipped directory (wp-content/plugins/statrix). If you don't, the only thing that would happen is that your blog will still detect Statrix as an available plugin for activation. When it is not activated, WordPress doesn't execute it at all.

    This means, that if you have a problem with your blog, it's not because of Statrix. Still, if you doubt that, you could try to remove Statrix unzipped directory (*your_blog*/wp-content/plugins/statrix). By doing that, you will remove all traces of Statrix from your blog.

    And in the very unlikely case that you actually managed to activate it, despite the error caused by your old PHP version, you could check your database for *prefix*_statrix table (the default prefix is wp). If it does exists, you could drop it.

    And after that, if your blog is still broken, then it most certainly is NOT because of Statrix.

  8. cronus3166
    Member
    Posted 5 years ago #

    Well boo :( I'm pretty sure mysql is 5.0, because I tried to activate it after the update and got this new error.

    Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in htdocs/button-smasher/wp-content/plugins/statrix/statrix.php on line 687

  9. azzatron
    Member
    Posted 5 years ago #

    hmm, i'm getting a new error with the updated version too.

    Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /home/azza/public_html/blog/wp-content/plugins/statrix/statrix.php on line 687

    thanks for your work on this though, it looks like a great plugin.
    cheers

  10. Iva Koleva
    Member
    Posted 5 years ago #

    cronus3166: your PHP should be at least 5.0, not your MySQL. ;) Could you tell me what is your PHP version?

    azzatron: can you tell me what exactly is your PHP version too?

  11. Member111
    Member
    Posted 5 years ago #

    Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /home/sites/the-deen.co.uk/public_html/wp-content/plugins/statrix/statrix.php on line 687

  12. Iva Koleva
    Member
    Posted 5 years ago #

    Your PHP is not version 5 at all. :)

    line 687:

    function printExport($filename, Exporter $exporter) {
    ...

    The error is because your PHP doesn't support objects like it should be in version 5.0. You can check that in the PHP5 changelog (http://www.php.net/ChangeLog-5.php#5.0.0).

    I'm sorry, but I really don't think I should downgrade my design to the point that it could work on PHP4. :)

    I've tested down to v5.0.3 and Statrix is working properly. I have added a Requirements section in the installation manual, but it seems that it's not enough.

    That's why I've already tagged Statrix v0.5, where it checks the PHP version itself. So if it's lower than 5.0, when you try to activate it, Statrix will tell you:

    Your PHP version is 4.4.8. Statrix requires PHP version 5.0 or greater (tested down to PHP v5.0.3).

    After few minutes it should be available for download. :)

    I hope this will end this PHP version discussion once and for all. :)

  13. azzatron
    Member
    Posted 5 years ago #

    Well apparently i have php version 5.2.5 according to my host.

    I'm now getting another error on line 696, and no message from starix saying that i dont have the correct php version.

    I'm wondering if theres something else wrong on my end. I have no idea what to check. Oh well, seemed like a good plugin. Thanks for your help e-sense.

  14. Iva Koleva
    Member
    Posted 5 years ago #

    There was a person with exactly the same problem as you.
    He told me that his hosting supports PHP v5.2.5.
    So he checked it again after the Statrix activation failure, and he found out something.

    His hosting supports PHP5, but he should use the .php5 file extension or add this line in a .htaccess file in the same directory as the PHP file/s:

    AddType application/x-httpd-php5 .php

    Otherwise, the PHP version defaults to 4.

    So after he created the .htaccess file, he successfully activated Statrix and has been using it since.

    You could easily check your actual PHP version by creating a *some_filename*.php file, containing this:

    <?php
    phpinfo();
    ?>

    and opening it with your browser.

  15. azzatron
    Member
    Posted 5 years ago #

    thanks e-sense, that .htaccess file fix worked perfectly :)

  16. Iva Koleva
    Member
    Posted 5 years ago #

    Glad to have helped, thank you for your comments on Statrix. :)

  17. cronus3166
    Member
    Posted 5 years ago #

    So I did some research and my php was version 4.8.75? Anyways it was to low, so after some more research, I was able to get it to default to 5.2.6

    So now I just need to see if it spots anyone other than me :)

    Thanks for all the help, great plug-in work!!

  18. Member111
    Member
    Posted 5 years ago #

    Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /home/sites/the-deen.co.uk/public_html/wp-content/plugins/statrix/statrix.php on line 696

  19. wmburke
    Member
    Posted 5 years ago #

    I had this same error, Member111, even after trying everything recommended above. However, I managed to solve the problem!

    Instead of placing a new .htaccess in the statrix subdirectory, I added the AddType application/x-httpd-php5 .php line to the .htaccess file in the main wordpress directory.

    I don't know enough about .htaccess files to know if it matters, but as a 1and1 customer, I used their recommended format for that line also:
    AddType x-mapp-php5 .php

    Hope this is helpful to someone!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags