• Resolved dhjdhj

    (@dhjdhj)


    Out of the blue, our website stopped working completely and we just started getting error messages displayed.

    PHP Fatal error: Can’t use function return value in write context in /home/gigperformer/public_html/wp-content/plugins/very-simple-knowledge-base/vskb-one-column.php on line 74

    No idea what happened or why. I temporarily disabled this plugin and got the website working again but without the knowledgebase.

    When I tried to activate the plugin again (I removed and reinstalled it, hope I haven’t lost our KB articles!), it would not activate and in the error logs I just saw the above message numerous times.

    Anyone know what might have happened and more importantly how to fix it?

    (NB, line 74 of that file is

    if (empty(get_the_title( $single_post->ID ) )) {

    )

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter dhjdhj

    (@dhjdhj)

    OK — I found a solution to this problem but I don’t understand WHY I had to do this.

    There are references to the ’empty’ function not working in earlier versions of PHP and they suggest making changes as follows:

    if (get_the_title( $single_post->ID ) == false ) {

    I made this change to all four PHP files (for one col, two col, etc) and everything started working again.

    However, this suggested fix is indicated for older versions of PHP. The site is running at hostgator, it was working earlier today and it is extremely unlikely that hostgator would have removed their current PHP and replaced it with older version.

    So any idea as to what might have happened here?

    Plugin Author Guido

    (@guido07111975)

    Hi,

    Oh, that’s very strange. I will look into this directly and will keep you informed..

    Guido

    Plugin Author Guido

    (@guido07111975)

    Hi,

    I did update plugin yesterday and add the title check. So that’s the reason this problem occurred at your site now. So you might do use an old PHP version. Can you please check this?

    According to php net it’s supported in PHP 5.5 and higher.

    Guido

    Thread Starter dhjdhj

    (@dhjdhj)

    Ah, and that explains things — not sure why the plugin updated automatically (didn’t think I had such things enabled) and you’re absolutely right that the PHP being used at Hostgator is 5.4 (sigh)

    Didn’t occur to me that your plugin changed!

    Thanks for the quick response.

    Plugin Author Guido

    (@guido07111975)

    First, thanks for your donation. I really appreciate this ??

    PHP 5.4 is quite an old version… I found this info on their site. When using Windows Shared Hosting your not able to update, as I understand.

    As mentioned before, I’ve updated plugin yesterday click here for the changelog.

    Guido

    Thread Starter dhjdhj

    (@dhjdhj)

    Actually, I think I’m getting too old for this stuff. I just ASSUMED my hosting site was using the latest PHP and didn’t even check that. I would have seen the issue immediately.

    Thanks again

    (And yes, you’re welcome, I’m always glad to support tools that we actually use)

    See https://gigperformer.com which is where we’re using it

    Plugin Author Guido

    (@guido07111975)

    Nice website (interesting product) and always nice to see my plugin in action ??

    I didn’t know it wasn’t supported in PHP 5.4 and lower until your thread here, so I try to find a solution that support all versions. Or I might just add a required PHP version in plugin readme file so new users are notified on wp dot org.

    Guido

    Thread Starter dhjdhj

    (@dhjdhj)

    Well, apparently the solution is to use

    get_the_title( $single_post->ID ) == false

    which is the change I made to fix it last night.

    Hi, this error brought down 8 webs I do. Which is really a disaster. Sorry, your plugin was useful but I must remove it and use something more stable and better tested….

    Plugin Author Guido

    (@guido07111975)

    Hi,

    I understand this is very annoying.

    Guess because you’re also have a (very) old PHP version… so that’s always a risk. Because many plugins do not support this anymore.

    I will update plugin asap so it will support 5.4 and older again.

    Meanwhile you can change it yourself easily, by using the fix mentioned in this thread.

    Guido

    Hmmm, OK, yes, you are right, webhosting was still on php 5.4 which was recommended version for WordPress in time when those sites were created. I changed it to 7.
    OK, I understand this is not your fault.
    But as always with such changes – timing was very unfortunate…
    So please do not use your enthusiasm to develop your plugin further…

    Plugin Author Guido

    (@guido07111975)

    So please do not use your enthusiasm to develop your plugin further…

    Really? Maybe you should not update plugin anymore. Or build your own.

    Guido

    Yes, I understand your attitude – and I apologize for the first reaction.
    But I use automated updates on all my websites to keep them up to date so I think you can imagine how I felt when some of them went down after update….
    But lesson learned – I had to improve monitoring to see which parameters are not up to date…

    Plugin Author Guido

    (@guido07111975)

    Apology accepted.

    The last thing I want is to crash somebody’s site. And I will update my plugin tonight.

    But as mentioned before this can happen again (with a random theme or plugin) when a PHP version is really old.

    Guido

    Thread Starter dhjdhj

    (@dhjdhj)

    Although I’m a software developer, I know very little about WordPress and the like, they’re really just “end user” tools for me. Having said that, I must admit to being rather astonished that the WordPress ecosystem can be brought down so easily. I would have thought that at the least there’s some validation scheme used to check plugins, catch any exceptions and perhaps automatically disable them.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Error bringing down entire site’ is closed to new replies.