Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running Pico on Synology Diskstation #538

Closed
bwbg opened this issue Apr 16, 2020 · 2 comments
Closed

Error running Pico on Synology Diskstation #538

bwbg opened this issue Apr 16, 2020 · 2 comments

Comments

@bwbg
Copy link

bwbg commented Apr 16, 2020

Firing up Pico after a fresh installation on my Synology Diskstation (DS218+) [DS] with DSM and "Web Station" (nginx, latest PHP) resulted in the following error:

Fatal error: Uncaught RuntimeException: Unable to load plugin '@eaDir' from '@eaDir/@eaDir.php': File not found in /volume1/web/vendor/picocms/pico/lib/Pico.php:671 Stack trace: #0 /volume1/web/vendor/picocms/pico/lib/Pico.php(552): Pico->loadLocalPlugins(Array) #1 /volume1/web/vendor/picocms/pico/lib/Pico.php(424): Pico->loadPlugins() #2 /volume1/web/index.php(39): Pico->run() #3 {main} thrown in /volume1/web/vendor/picocms/pico/lib/Pico.php on line 671

It seems the DiskStation makes these ominous @eaDir-directories visible in all sub(directories) of its shares. To prevent searching these quirky directories i'd suggest a "canonical path"-filter for plugins:

https://github.com/bwbg/Pico/commit/14d11fe9baff6ea2176cd1df4363444621e59891

@PhrozenByte
Copy link
Collaborator

PhrozenByte commented Apr 20, 2020

Unfortunately I'd rather classify this as "expected behaviour" right now 😒

Since Pico 2.0 we're very strict about loading plugins via filesystem - since we don't have a admin interface a user might not easily tell whether a plugin is loaded or not, and unexpectedly not loading a plugin might create security issues (just think of a user authentication plugin). Since this is no common problem I don't think it's justifiable to add a specific solution for Synology Diskstations to Pico's core.

However, I'm not very satisfied with Pico's plugin discovery in general - like not being able to move a plugin's class to a PHP namespace is bad. However, requiring composer (or any other plugin installation routine) is no solution either, since being able to run Pico basically everywhere (like Synology DiskStations 😄) is one of Pico's main goals.

So this situation is kinda frustrating... It's neither a bug nor a situation where I'd say "everything's fine, nothing to do here", so I've added this to the backlog of Pico 3.0 (which is currently under development, see #317 and #535). I'll think about this. My current thinking utilizes iterators that could be overloaded, allowing you to easily add a exception for Synology Diskstation. You shouldn't be required to patch Pico's core... 😞

@stale
Copy link

stale bot commented Apr 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! 👍

@stale stale bot added the info: Stale label Apr 28, 2020
@stale stale bot closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants