Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2018-05-16 14:17:08

gaekwad
Member
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,379

Re: Two issues with 4.7.0

PS: the only time I’ve ever encountered UnexpectedValueException stuff it was a) Laravel-related and b) permissions solved it.

Offline

#32 2018-05-16 14:29:45

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 137
Website

Re: Two issues with 4.7.0

Hey all,
I don’t use specific overrides when FTP’ing with Fetch. The textpattern/vendors/Textpattern/Iterator/RecDirIterator.php e.g. has 644.

jakob wrote #311846:

Also, do you have any plugins loading from the plugin_cache directory? (I can’t remember if they’re reported in diagnostics).

Jakob, no, nothing that I would be aware of.

Offline

#33 2018-05-16 14:33:18

gaekwad
Member
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,379

Re: Two issues with 4.7.0

funtoosh wrote #311848:

I don’t use specific overrides when FTP’ing with Fetch. The textpattern/vendors/Textpattern/Iterator/RecDirIterator.php e.g. has 644.

644 means nobody has execute rights, which is possibly a factor in the permissions error.

Try this – set file and directory permissions to 755 on upload instead of 644, so the web server user can do its work.

Last edited by gaekwad (2018-05-16 14:33:26)

Offline

#34 2018-05-16 14:51:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Two issues with 4.7.0

644 is fine for the PHP files – but the directories themselves usually need 755 – or at least the relevant execute permission and a user:group that the web server can use, as you say.

If I manually hack my textpattern/vendors/Textpattern/Iterator directory to have 644 permissions, I only get the expected Fatal error: Class 'Textpattern\Iterator\RecDirIterator' not found – not the UnexpectedValueException.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#35 2018-05-16 14:58:37

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 137
Website

Re: Two issues with 4.7.0

Yeah, that’s not the culprit, my textpattern/vendors/Textpattern/Iterator is 755 …

Offline

#36 2018-05-16 15:00:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Two issues with 4.7.0

And PHP says:

Throws an UnexpectedValueException if the path cannot be found or is not a directory.

EDIT: And in the case of the RecursiveIteratorIterator, one of the user comments states:

if there is a directory contained within the directory you are searching in that you have no access to read an UnexpectedValueException will be thrown (leaving you with an empty list).

This just gets weirder.

Last edited by Bloke (2018-05-16 15:02:19)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#37 2018-05-16 15:04:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Two issues with 4.7.0

Ah, bingo!

If you set one of the theme directories within the themes directory itself with permissions that are not readable by the web server, you do indeed get UnexpectedValueException. So it is the (stupidly named, imo) RecursiveIteratorIterator that’s complaining.

At least we have something to go on now..


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#38 2018-05-16 15:09:11

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 137
Website

Re: Two issues with 4.7.0

I was thinking it might have to do with the subdirectory though, which might as well lead to a path error.

In this configuration, their root is not muenster.org but muenster.org/medienforum/ …
It’s handled like the old paradigm server.org/~user/

Offline

#39 2018-05-16 15:09:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Two issues with 4.7.0

Now, this may be an issue if somebody manually extracts a theme – say one they downloaded from our one-day themes site or that was shared by the community – and doesn’t set the same permissions as the surrounding directory. Or maybe if some themes in the /themes directory are symlinked somewhere else in a multi-site installation.

So we definitely need to counter this somehow, but the whole RecursiveIterator thing is above my pay grade right now. Will take some time for me to grok it, so if anyone knows anything about why it does this and can offer a patch/solution before I get a chance to look at it later in the week, please be my guest.

Last edited by Bloke (2018-05-16 15:10:10)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#40 2018-05-16 15:21:25

gaekwad
Member
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,379

Re: Two issues with 4.7.0

Sher-Bloke Holmes strikes again!

Can you summarise in an issue so we can track it, Stef?

Offline

Board footer

Powered by FluxBB