Neos on Plesk 12.5 Server with chrooted environment

Cheers to all

I’m try to install neos in a chrooted PHP 5.6 environment in Plesk Server 12.5
I’m able to setup all sources via composer - this works fine.

If I open the index.php, it shows that i must go to the setup.
After following the Setup link, there is a loop - nothing happens until my server timeout .

I get the following errors in my error_log, because there is no PHP binary in Plesk installations available.

[Tue Nov 24 11:23:29 2015] [warn] [client 10.0.60.48] mod_fcgid: stderr: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/opt/plesk/php/5.6/bin/php-cgi) is not within the allowed path(s): (/var/www/vhosts/<domain>/:/tmp/) in /var/www/vhosts/<domain>/httpdocs/Packages/Application/TYPO3.Setup/Classes/TYPO3/Setup/Core/RequestHandler.php on line 164, referer: http://<domain>/
[Tue Nov 24 11:23:29 2015] [warn] [client 10.0.60.48] mod_fcgid: stderr: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/usr/local/bin/php) is not within the allowed path(s): (/var/www/vhosts/<domain>/:/tmp/) in /var/www/vhosts/<domain>/httpdocs/Packages/Application/TYPO3.Setup/Classes/TYPO3/Setup/Core/RequestHandler.php on line 164, referer:  http://<domain>/
[Tue Nov 24 11:23:29 2015] [warn] [client 10.0.60.48] mod_fcgid: stderr: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/usr/bin/php) is not within the allowed path(s): (/var/www/vhosts/<domain>/:/tmp/) in /var/www/vhosts/<domain>/httpdocs/Packages/Application/TYPO3.Setup/Classes/TYPO3/Setup/Core/RequestHandler.php on line 164, referer: http://<domain>/
[Tue Nov 24 11:23:29 2015] [warn] [client 10.0.60.48] mod_fcgid: stderr: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/bin/php) is not within the allowed path(s): (/var/www/vhosts/<domain>/:/tmp/) in /var/www/vhosts/<domain>/httpdocs/Packages/Application/TYPO3.Setup/Classes/TYPO3/Setup/Core/RequestHandler.php on line 164, referer: http://<domain>/
[Tue Nov 24 11:23:29 2015] [warn] [client 10.0.60.48] mod_fcgid: stderr: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/opt/plesk/php/5.6/bin/php) is not within the allowed path(s): (/var/www/vhosts/<domain>/:/tmp/) in /var/www/vhosts/<domain>/httpdocs/Packages/Application/TYPO3.Setup/Classes/TYPO3/Setup/Core/RequestHandler.php on line 164, referer: http://<domain>/

Is there any solution to setup Neos in chrooted environments without php binary?

thanks so much for your help!

open basedir is not the same as chroot. You can only make that work if you provide a php CLI binary within the open basedir restricted paths.

I’ve added “/opt/plesk/php/5.6/bin/” to the open_base_dir - so neos are able to execute the binary “php-cgi” as PHP 5.6 Version.

Is this enough or do you need a special CLI binary? (Like PHP CLI from apache-mpd-php)

The real PHP CLI is what we all use, and I honestly don’t knwo if a CGI binary works as well.

Do you have any new/different errors now? Or did it work out in the meantime?

CGI won’t work, you need a CLI binary.

Thanks for this information.
Under this condition, Typo Neos isn’t a product for chrooted, shared webhosting environments for me.

Thanks for your help and support!

Hey @Elompenta we might change this behavior in the future but I know that hosters with chroot can make it work, you just need to provide the CLI binary inside the chroot. This is also best practice for other PHP tools like composer.