Hi all, i want to install drupal with composer. I configure a normal website with php8.2 and installed the php8.2-phar package system wide. If i log in via ssh into the webspace and run composer create-project drupal/recommended-project ../web/ i get error message PHPs phar extension is missing. If i create an phpversion.php file with phpinfo() i see correct PHP 8.2 Version with installed par extension. If i enter php -v i got old PHP Version 7.0. My question is how to configure composer in isp to use different PHP Version and the one i specialy configure for website. Thx
You can prepend the PHP binary of the version you want to use before the compose command. Example: Code: php8.2 -f /usr/local/bin/composer update
You mean, using the chroot user of that webspace? Using jailkit? In that case, one would need to add extensions or different applications which should be available to a list. If you have multiple php versions this could be an explaination. Though php 7.0? really? Which OS are you using? This version shouldn't be out there anymore imho
Yes its the chroot user with jailkit. Its on Debian 11, but the Server is initial setup as PHP 7.0 was out. I will change it to PHP8.2.
I could install drupal via composer now, but the process seems to install a project folder direct in web/ Dir and under that drupal in another web directory. Is there a way to install drupal direct in the web root? If not i have to configure a Redirect to the drupal web folder. Any recommendations and experience with that? thx
yes, you need to add a redirect, or a snippet for your webserver config. heh ok, @till allows to change the document root, go for it, this is better
Apache, i never changed the document root in the past. I see unter website and domain the path but its not changeable. Where to do that?
You can change it using the apache directives field of the website. E.g. you installed drupal into ..../web/somefolder/ then you add this in the Apache directives field: Code: DocumentRoot {DOCROOT_CLIENT}/somefolder/ Chnage the word somefolder to the right folder name.
Hi till, yes of course in the apache directives. Thanks for pointing me to that. Thanks ztk.me also for your reply.