• I look after a site that has had no WordPress changes to it beyond plugin and theme updates. The host however has updated to php7.4.

    We have used this plugin successfully for years.

    I don’t know if it’s the cause but the plugin now throws a fatal error and can’t be activated.

    Warning: require_once(lcp-catlistdisplayer.php): failed to open stream: No such file or directory in include/lcp-widget.php on line 6

    Fatal error: require_once(): Failed opening required ‘lcp-catlistdisplayer.php’ (include_path=’.’) in include/lcp-widget.php on line 6

    Any ideas what might be wrong? I’m wondering if php7.4 is the issue. I’m not in a position to roll it back as it’s not my hosting but have asked the client to try and get it done.

    Thanks in advance.
    Pat

    • This topic was modified 3 years, 5 months ago by patsky. Reason: php version
Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter patsky

    (@patsky)

    Still having an issue with this on the live site. Everything has been updated to latest versions.

    I installed a copy of the site on my own hosting with a 7.3.x version of php and everything worked correctly as before so this is mystifying.

    I’ve tried several older versions of the plugin on the live site and the fatal error remains.

    Is there any help anyone can give please.

    This plugin totally F-ed up our site. I finally had to disable all plugins and try to re-activate them one at a time. This one fails to active, with the above mentioned error when using PHP 7.4. Our hosting provider is forcing us onto PHP 7.4 so we have no choice but to stop using this plugin.

    I am using PHP version 7.4.15 (Supports 64bit values) and this plugin works OK still.

    Plugin Contributor zymeth25

    (@zymeth25)

    The development version is constantly being tested with PHP 7.4 so I can confirm it works.

    Please look at the error message and try checking the issue it reports: can you find the include/lcp-catlistdisplayer.php file or is it missing?

    I did that. All the files are there.

    I looked at it in much more detail.

    I manage two sites.

    One is on PHP 7.4.10 and the other is on PHP 7.4.16. Its working fine on PHP 7.4.16 but on PHP 7.4.10 the above error is reported and WordPress refuses to activate the plugin.

    In my case the entire site went down and it took me several hours to narrow it down to this plugin.

    So it may well be a bug in PHP but maybe you can work around it. I also raised the issue with the hosting company (telus.com) because they plan to force this version of PHP on all of their customers on June 29.

    Every other plugin, I use quite a few, worked. So I’m not sure what is going on with this one and that version of PHP. I did try with PHP 7.2, 7.3, and it was only when I went to 7.4 (specifically 7.4.10) that the problem happens. So its really strange. I had to solve it before June 29 and for now the only solution is to disable this plugin.

    Plugin Contributor zymeth25

    (@zymeth25)

    Try changing line 6 of lcp-widget.php to this:

    require_once plugin_dir_path( __FILE__ ) . 'lcp-catlistdisplayer.php';

    That did not work.

    However I noticed that list-category-posts.php includes the file on line 33:
    require_once 'include/lcp-catlistdisplayer.php';

    So if I comment out line 6 in include/lcp-widget.php:
    //require_once 'lcp-catlistdisplayer.php';

    Then the plugin activates, not sure if it works, but it activate ??

    Maybe that’s a clue.

    • This reply was modified 3 years, 5 months ago by burningthumb.
    Plugin Contributor zymeth25

    (@zymeth25)

    If you comment out that line the plugin should work fine as long as you are not using the widget (which you should not use anyway, shortcodes in text widgets are preferred).

    Plugin Contributor zymeth25

    (@zymeth25)

    Also, have you tried disabling all other plugins?

    I disabled all plugins and started activating them one at a time until I hit this one. I did not go back and do it again with just this one active. I talked to the site owner and she told me they are not using this plugin any more anyway so for me, its a wrap, hopefully someone else that needs it can take it from here.

    • This reply was modified 3 years, 5 months ago by burningthumb.
    Thread Starter patsky

    (@patsky)

    @burningthumb yes this was my experience. It broke the site completely. It had worked up until 7.4 was installed by the host.

    I have done what you suggested and the plugin activates and everything seems to be working now. So thank you very much.

    @zymeth25 I haven’t tried your fix as @burningthumb said it didn’t work. You say you’ve tried it on 7.4 and it works but this definitely isn’t my experience although I’m now not sure specifically whether it’s 7.4.16 or earlier.

    Anyway, I’m happy it works again. It’san incredibly useful plugin. Will you be putting out an update shortly?

    Thanks to everyone for your input.

    Plugin Contributor zymeth25

    (@zymeth25)

    @patsky Can you paste the debug information as provided by the Health Check plugin?

    • This reply was modified 3 years, 5 months ago by zymeth25.

    @patsky There is a plugin called Display PHP Version (https://www.ads-software.com/plugins/display-php-version/) which will show you on your WordPress > Dashboard > Home > At a glance, the PHP version like 7.4.x.

    For me, if x=16 it works (I believe I saw a post where x=15 also works), for me if x=10 as in 7.4.10 I get the error. I don’t know if you are using a different version of 7.4.x than me but if so that may help narrow the issue down. It looks to me like a PHP problem that the plugin developer should be able to work around since every other plugin does not have the problem.

    Glad its working and as @zymeth25 says if you are not using the widget it should be fine.

    Hello, I had this same error. PHP was version 7.4.19, and WordPress 5.8. Neither recommendation above worked for me.

    I was able to fix it by downgrading WordPress back to 5.7.2 (in the end, I’m not sure if this was necessary), and I commented out line 31

    // include ‘include/lcp-widget.php’;

    removing the include of the widget. And after that I could activate the plugin and it functions normally.

    Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Fatal error’ is closed to new replies.