What type of hardware are you using: VPS bought online What YunoHost version are you running: 11.2.30.2 (stable) How are you able to access your server: The webadmin
SSH
Describe your issue
Hello everyone,
I would like to install my own CMS (Contao) in a My_WebApp environment. To do this, I need to call an install.phar file (or as install.phar.php) from the WebRoot folder (www).
If I understand this correctly, then I also need to install the Composer. Is that correct?
Are there any conflicts with the YunoHost system?
Can any of you give me tips?
Thank you very much
Tinder
I’ll use this topic as my use case its the same.
I tried to install composer inside mywebapp but gives an error on php composer-setup.php:
unable to create composer home directory /.composer mkdir() permission denied
i think its trying to install on /var/www/mywebapp and doesn’t have permissions. I tried to set location argument `php composer-setup.php --install-dir=/var/www/mywebapp/www but it tried to install on the same location
How can i install composer on webapp?
Hijacking topics? I’ll keep the option to split it.
Please show that you have followed the steps of the second post of this thread. Do not hesitate to copy the content of the terminal and not only the error.
All settings correct for using Composer
Unable to create Composer home directory “/var/www/my_webapp__3/.config/composer”: mkdir(): Permission denied
The my_webapp $HOME permissions do not allow the my_webapp user to write, but this can be seen as good thing for a public web app. One can create the required user writable .config and .cache dirs (or symlinks) as root.
The php command does not call the correct php version in all cases. It’s currently just a php() shell function, but only having e.g. ~/bin with an appropriate symlink in it, and exporting an adjusted $PATH can have an effect for arbitrary scripts and binaries.
That’s a bit more worrisome, the point of that command redefined with Bash is to point to that correction version. Can you show some examples of that command not using the right version?
Yeah, the shell function can select the correct (configured) version, but for sure only for shell interpreted scripts.
For example, not for #!/bin/php scripts, or php calls (scripts started through bash) that themselves call further php scripts.
It’s a common issue if you search for it, with the solution being to instead place a symlink to the desired php version in an exported custom $PATH (a general unix/posix thing).