Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Having trouble installing serendipity?
Post Reply
Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by Huhu » Thu Aug 10, 2017 3:24 pm

Update, 6/20: Both plug-in updates and Maintenance and Themes links broken.

(was: Failed expaning backend menu itemsI installed a fresh version of S9y but for some reason, the menu bars (not the main menu to the left) don't expand. Id est, I can't edit any user details and such since they don't work.
Tried different browsers and of course switched on JS and ad filters off ... )

UPDATE: Just copying the files again did the trick, for some reason something was corrupted.

But the problem down there is still present (PHP 7.0.12, tested with PHP 5.6 as well):
The error I get when clicking on "Install new Sidebar plugin":

Code: Select all

Fatal error: require_once(): Failed opening required 'PEAR/Exception.php' (include_path='.:/usr/local/.../bundled-libs/:/storage/content/.../bundled-libs/Smarty/libs/:/storage/.../public_html/:') in /.../public_html/bundled-libs/HTTP/Request2/Exception.php on line 24
There is no /php70 under /usr/local/ only, the /php56 ... but php7 is activated ...
And even when switching to PHP 5.6, the same error message appears, even though the path is valid now.

Thanks for help!
Last edited by Huhu on Mon Jan 06, 2020 10:05 am, edited 1 time in total.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Re: Failed Opening PEAR/Exception.php

Post by Huhu » Thu Aug 17, 2017 8:49 am

An interesting detail also for the developers maybe: After contacting the webhoster, I got the answer
It seems that open_basedir is the problem. open_basedir is activated as standard and leads to that the website cannot read files from other folders, as a security measure.
Now the page reads correctly but I get a 404 in themes and Install New Plug-Ins (which is not a big issue for me -- well teh Plug-In install sources might become one -- but might be for others):

Code: Select all

 The URL http://netmirror.org/mirror/serendipity/package_template.xml (IP 176.9.206.60) could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
(The repository returned error code 404.)
 Trying to use cURL library as fallback...
Not Found

The requested URL /mirror/serendipity/package_template.xml was not found on this server.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

User avatar
onli
Regular
Posts: 2388
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Failed Opening PEAR/Exception.php

Post by onli » Thu Aug 17, 2017 11:33 am

I'm not sure how we ought to react to the open-basedir thing. Either the hoster allows for including the necessary php requirements, or it just can't work. I might miss something though.

The other error message is caused by netmirror. I had thought that was working again, at least partly, but that does not seem to case. Please set spartacus to fetch files from github.

Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Re: Failed Opening PEAR/Exception.php

Post by Huhu » Thu Aug 17, 2017 1:29 pm

onli wrote:I'm not sure how we ought to react to the open-basedir thing. Either the hoster allows for including the necessary php requirements, or it just can't work.
Yes, seems to be up to the hoster. Mine changed their standard settings for the website after inquiry so that it now works.
onli wrote:The other error message is caused by netmirror. I had thought that was working again, at least partly, but that does not seem to case. Please set spartacus to fetch files from github.
Very appreciated, will do that. Had copied plug-ins from other installations I did earlier, but this is much smoother of course.

Thanks!
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Re: Failed Opening PEAR/Exception.php

Post by Huhu » Mon Jan 06, 2020 9:47 am

The problem turned up, again,after auto-updating to the current version (Clean Blog, PHP 7.2.10), now with the page https://www.jarnsvenskan.se . Error message turns up only when
a.) clicking on "update plug-ins" or
b.) "install a new plug-in" or
c.) on the "Maintenance"
d.) and "Themes" link.
e.) during publish, after the trackback search.

Other blog installations with the same (=current) version of Serendipity, with other providers, are not affected.
I updated all event plug-ins, no changes.

Then I contacted the provider, since the PHP options should now be correctly set. They claim this would be a code-related error.

Code: Select all

Fatal error: require_once(): Failed opening required 'PEAR/Exception.php' (include_path='.:/usr/local/(...)/bundled-libs/:/storage/content/(...)/bundled-libs/Smarty/libs/:/storage/content(...)/public_html/:') in /storage/content/(...)public_html/bundled-libs/HTTP/Request2/Exception.php on line 24
The "Smarty" line sounds interesting there.

Installed plug-ins:
Spamblock Bee (Honeypot, Hidden Captcha)
serendipity_event_spamblock_bee

Markup: clickable email adresses - but with antispam
serendipity_event_email_bot_obfuscator

Markup: Serendipity
serendipity_event_s9ymarkup

Spam Protector
serendipity_event_spamblock

Spartacus
serendipity_event_spartacus

pluginsRecaptcha
serendipity_event_recaptcha

Backup Interface ()
serendipity_event_backup

Static Pages
serendipity_event_staticpage

Contact Form
serendipity_event_contactform

HTML-Code inside head (HTML-Head Nugget)
serendipity_event_head_nugget

Serendipity Autoupdate
serendipity_event_autoupdate

Extended properties for entries
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

User avatar
onli
Regular
Posts: 2388
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by onli » Mon Jan 06, 2020 12:46 pm

If it works with the same version elsewhere it has to be a hoster issue. It is possible we could improve the situation, but I don't know how.

There is a PEAR/Exception.php in your bundled-libs, isn't there? The first entry in the include_path leads to the correct bundled_libs folder, the one of your serendipity installation?

User avatar
erAck
Regular
Posts: 148
Joined: Mon Feb 16, 2015 1:20 am

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by erAck » Mon Jan 06, 2020 1:35 pm

This part looks odd
include_path='.:/usr/local/(...)/bundled-libs/:/storage/content/(...)/bundled-libs/Smarty/libs/
There should not be
/usr/local/(...)/bundled-libs/
but instead
/usr/local/...:/storage/content/(...)/bundled-libs/
But I assume you crunched that when editing the (...) parts out.

It may be that your hosting environment's local PHP PEAR is not installed or not accessible, in which case adding this to serendipity_config_local.inc.php may help

Code: Select all

$serendipity['use_PEAR'] = false;
That should pull in the bundled PEAR first by adapting include_path.

However, a PEAR in your PHP hosting environment is preferable, maybe your hoster forgot to install..

Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by Huhu » Tue Jan 07, 2020 9:44 am

@oli Path is /storage/content/((crunched))/jarnsvenskan.se/public_html/bundled-libs/HTTP/Request2/Exception.php
Permissions of Exception.php are rwxr--r-- so executable by owner.
Yet INSIDE the /Request2 folder, there is of course no PEAR folder, so if the

Code: Select all

require_once 'PEAR/Exception.php';
refers to the relative location (/Request2/), there is no target. PEAR is located in bundled-libs (is it should be afaik).

@erAck
Thanks! The path is indeed "storage/content/((crunch))/jarnsvenskan.se/public_html/bundled-libs/"


Including

Code: Select all

$serendipity['use_PEAR'] = false;
strangely doesn't change anything.

I might add that the problem came up after updating from 1.5 (I think) to the current version.
The admin site takes pretty long to load as well, though I am not sure whether this is connected.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

User avatar
erAck
Regular
Posts: 148
Joined: Mon Feb 16, 2015 1:20 am

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by erAck » Tue Jan 07, 2020 10:46 am

Huhu wrote:
Tue Jan 07, 2020 9:44 am
Including

Code: Select all

$serendipity['use_PEAR'] = false;
strangely doesn't change anything.
It should at least change the error message's include_path='...' order where the bundled-libs paths should come first then.

Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by Huhu » Wed Jan 08, 2020 9:30 am

I'll have a look.
By the way, does the website also load extremely slowly for you (https://www.jarnsvenskan.se) ? or is this connection-related on my side only?
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

User avatar
onli
Regular
Posts: 2388
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by onli » Wed Jan 08, 2020 11:23 am

There is on GET request that took 31.16 seconds, that should be the issue. It calls https://jarnsvenskan.se/index.php?/plug ... autobackup

Huhu
Regular
Posts: 131
Joined: Tue Oct 04, 2011 3:22 pm

Re: Failed Opening PEAR/Exception.php (Themes, plug-ins, Maint)

Post by Huhu » Wed Jan 08, 2020 11:52 am

Brilliant, thanks onli. One issue solved :)
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport

Post Reply