contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
86 stars 33 forks source link

contao-manager.phar.php - Access denied. #574

Closed lug-gh closed 3 years ago

lug-gh commented 4 years ago

Moin,

aus einem mir unbekannten Grund, funktioniert die Erstinstallation von Contao Managar nicht.

Umgebung: Apache 2.4.18 php7.3-fpm Ubuntu 16.04

Version 4.9 und 4.4 funktionieren beide nicht.

Ich lade also die contao-manager.phar herunter, benenne Sie in contao-manager.phar.php um und rufe die Seite unter http://www.example.org/contao-manager.phar.php auf. Dann lächelt mich nur ein Plaint-Text "Access Denied." an, im Apache error Log erscheint folgendes:

[Mon Jul 13 14:17:12 2020] [error] mod_proxy_fcgi.c(745): AH01071: Got error 'Access to the script '/var/www/example.org/web/' has been denied (see security.limit_extensions)\n'

Die Einstellung security.limit_extensions ist default, und lässt php zu (info.php als Test funktioniert wunderbar). Leider kann ich aus der Fehlermeldung nicht schlussfolgern, was das contao Installationsskript versucht auszuführen.

In der Dokumentation konnte ich dazu auch nichts finden, und laut google hatte anscheinend noch niemand sonst das Problem ;)

aschempp commented 4 years ago

There is most likely nothing the Contao Manager can do about that. This looks like a problematic configuration of your hoster. Did you contact your hoster and ask about Phar support?

lug-gh commented 4 years ago

I am the hoster :)

Config is pretty much default, just some variables adjusted, but nothing related to this.

aschempp commented 4 years ago

I don't know your hosting configuration. But I'm sure it's not a bug in the Manager, but in that config. A quick web search returned this for example: https://robertbasic.com/blog/php-fpm-security-limit-extensions-issue/

lug-gh commented 4 years ago

Well, it's not a bug, yes. It is just some configuration issue, but I don't know where/what. That link you provided is for nginx, I use Apache, and the mod fastcgi is globally enabled.

And that works fine for every other CMS, like wordpress or typo3, but that phar of contao seems to work in another way - which is not allowed by default, by I have absolutely no clue how to allow it. Unfortunately apache doesn't really show why it's blocked, even when setting the debuglevel to trace

aschempp commented 4 years ago

I think this is not related to Contao or Wordpress, but simply that a Phar file is something different than just PHP. But again, I can't help you because I don't know anything about server configuration. But I'm pretty sure there are a lot of search results on possible configurations for PHP-FPM, Apache and Phars.

ausi commented 4 years ago

The error message seems to be related to the file extension. @lug-gh you could try to create a test.phar.php with the contents <?php echo "test"; on your server and test if this file works.

aschempp commented 3 years ago

I'm closing this as the discussion seems dead, feel free to reopen if necessary 😊