Introduce yourself here! In order to avoid spam, new users must first comment on the discussion in the 'Introductions' before they become 'full members'
PHP upgrade
  • My host sent out an announcement that in a few days they are upgrading to PHP 5.4.  Are my FlatPress installs gonna blow up?
  • Hi, I'm currently using FP with PHP 5.6.2 (the Debian official one) and I've no troubles :-) 
  • Thanks.  Updates/upgrades are always stressful.  Will report the outcome in a few days.
  • Everything was working.  Then it was not.  Got bit by this one again:

    http://flatpress.org/vanilla2/discussion/1814/fatal-error-call-time-pass-by-reference#Item_11

    And now two new errors on my FP installs.  You can see both on this page:

    http://www.saynotogmos.org/ud2012/index.php/allentries/

    Strict Standards: Non-static method
    StringParser_Node::destroyNode() should not be called statically,
    assuming $this from incompatible context in /home/********/public_html/ud2012/fp-plugins/bbcode/inc/stringparser.class.php on line 356

    Strict Standards: Only variables should be passed by reference in /home/********/public_html/ud2012/fp-includes/smarty/plugins/function.list_categories.php on line 33

    I haven't played with these sites in a long time so am rusty.  Hope you can walk me through it.

    TIA



  • Some progress . . . I got the fp-plugins/bbcode/inc/stringparser.class.php problem sorted by updating the file from SVN.  YEA!

    However, the fp-includes/smarty/plugins/function.list_categories.php file in SVN is identical to the one installed so the problem lies elsewhere.
  • Strict standards are not a real error, you can turn it off.
    However please check Github instead of SVN.
    The version from github should not have problems.
  • Thanks. Well, it kinda worked.   It changed the errors from this (three iterations):

    http://www.saynotogmos.org/ud2011/index.php/allentries/

    to this (one iteration and a different line #):

    http://www.saynotogmos.org/ud2012/index.php/allentries/

    How do I turn off 'strict'?  And what should the permissions be on that file?
  • You can add this to the beginning of your defaults.php
    error_reporting(E_ALL E_NOTICE ^ E_STRICT);

    However did you replace entirely your file?
    Because I can't see anything that would trigger a strict about references...
  • Yes, I copied the raw file from the link you provided.  You didn't answer about permissions.  Should that file be executable?
  • FWIW, I added that line to the top of defaults.php above all the definitions and it made no difference.  Any other ideas?

  • pierovdfn said:

    You can add this to the beginning of your defaults.php

    error_reporting(E_ALL E_NOTICE ^ E_STRICT);


    This did not stop the error reporting.  I have found additional errors in other parts of the blog all related to strict.  What a mess!
  • All but one of the errors on the public part of FP were fixed by replacing with more recent files from Source Forge.  I added the code below to the top of the one file - /fp-includes/smarty/plugins/function.list_categories.php - that didn't get fixed by a newer version.  It's slightly different than the code you suggested above:

    error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);

    Then I noticed there are errors in the admin panel as well. Will sort those out later.
  • Hi, sorry, I didn't see the question about permissions...
    Those files aren't a problem, right now, but it would be better not allowing execution of files under Unices systems (they could change it and make it compatible with their shells...), unless you need a file to be executable.
    Directories in Flatpress, instead, need execution permission because allow to read their content.

    I took the code from PHP.net so I tought it would work.
    However please check if there is another error_reporing or ini_set error_reporting(....).

    Well, I've found the error on the file: it is on line 55: remove & before $lines (but only there!)...
  • THANK YOU!  The removal of the & does indeed fix the error. A bit like trying to find a needle in the haystack so much appreciated.  Might be good to change it on github.  FWIW I found the alternative code to turn off error reporting at:

    http://stackoverflow.com/questions/9983286/disabling-strict-standards-in-php-5-4

    I asked about permissions because the old file on the server was executable but the replacement that I downloaded was not.

    Thanks again.
  • You're welcome :-)
    In my last installation all files have 644 and their owner and group is different than the webserver one.
    The only exception is fp-content, the only one directory in which the server can write. The owner of the files in fp-content is the webserver user.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion