4

In a LAMP application based on Symfony2, I need to provide a specific web service in admin panel to update "on-demand" specific dependencies managed by Composer ( ~like plugins update in WordPress admin panel).

Application are deployed on servers by real user (application files owner are not www-data).

I thought these solutions :

  1. Apache user run directly Composer shell command (shell_exec, Symfony/Process):
    • composer.lock must be writeable for Apache user
    • $COMPOSER_HOME path must be defined and writable for Apache user
    • All concerned vendor dependency files must be writable for Apache user
    • Apache user should be able to use GIT client with SSH protocol
    • ... maybe other points i don't think
  2. Apache user run Composer shell command as real user, using sudo
  3. Use third-party tool, cronjob or Event-driven I/O (ReactPHP ?)

I'm not sure if theses solutions are good, secure and simple to deploy.

What is the best way for you ? Any suggestions/ideas are welcome ! Thanks.

Community
  • 1
  • 1
Koryonik
  • 2,728
  • 3
  • 22
  • 27
  • possible duplicate of [Run composer with a PHP script in browser](http://stackoverflow.com/questions/17219436/run-composer-with-a-php-script-in-browser) – Danack Nov 05 '13 at 19:35

0 Answers0