Using PHP Composer in the 1&1 Web Hosting Packages

PHP Composer (Composer) is a so-called „dependency management tool“, which makes possible for you to comfortably reference and keep up-to-date the external sources and libraries in your own PHP projects.

Many open source projects now no longer supply any ZIP archives or other installation packages – but reference the respective GitHub repositories.

To use Composer in the 1&1 Web Hosting and Performance Hosting packages, you must know that Composer is not installed by default, that it is a small PHP script, which requires a PHP interpreter. However, 1&1 offers a variety of current PHP versions – which can be set for each domain.

By default, Composer will however not be called in the web browser, but via the so-called shell or console.

Note: In almost all 1&1 packages, shell access via SSH is possible. If your package does not support SSH access, you should best change to the next higher one, because Composer itself requires more resources.

To use Composer in your 1&1 Web Hosting package, please log in via SSH and execute the following steps – should you have any questions, insert them as comments at the end of the article:

    1. Download Composer:

      curl -sS | /usr/bin/php5.5-cli

      Then, a composer.phar file is available in your webspace. If you call the composer.phar directly, you will get an error because Composer will not automatically find the correct PHP version.

    2. Start Composer for the first time:

      /usr/bin/php5.5-cli composer.phar

      As a result, you get an overview of all the Composer “commands”:


    3. To always use the latest Composer version, use for example the following command:

      /usr/bin/php5.5-cli composer.phar selfupdate


Important note:

The path to PHP-CLI in the above example depends on the version and may change!


We look forward to your feedback! Have you already been using Composer?


Please rate this post :

47 thoughts on “Using PHP Composer in the 1&1 Web Hosting Packages

  1. Kate Davis says:

    Next week, we will tell you how to use Composer at 1&1, e.g. when installing the CMS Typo3 NEOS.

    Please do the above as I keep hitting errors on the install!

    1. Philipp Bellmann says:

      Hey Kate,

      we will start work on the NEOS guide later than expected. We know that getting NEOS up and running is not trivial, so we want to provide a thourough guide, once we release it. Thanks for your patience.

  2. Kate Davis says:

    I am trying to install Neos on a 1and1 site and could do with getting past the failing install screen.
    I use SSH to do the Composer aspect. I change flow.bat, Setting.yaml and although phpinfo can find php version and php.ini, the Neos install aspect cannot work out anything.

    I have quite happily installed it under Mamp on my Mac. My brain is totally confused and completely embarrassed, please help?

  3. Lui says:

    What to do when we have a composer out of memory error while running composer update?

    1. Ness says:

      I have the same problem

  4. mark says:

    Ive got composer installed and want to add the Amazon API to it but keep getting this error even though Im referencing PHP6? How do I force it to use PHP6?

    exeu/apai-io 2.0.0 requires php >=5.6.0 -> your PHP version (5.4.45) does not satisfy that requirement.

    1. 1and1help says:

      Hi mark,

      in our history of PHP versions over the last years, PHP6 is in fact PHP 5.4 (the PHP community had plans for PHP 6, but dropped them and released 5.5, 5.6 and as a next step 7.0 instead).

      For usage via shell commands we are not offering more than php5.5 yet. Will be updated in the future, but no ETA for it yet, sorry.

      Michael, 1&1

  5. Diego says:

    I don’t understand why we must use php 5.6 or php 7 in our hosting but can’t use in ssh console.
    You must offer php 5.6 or php 7 soon as posible because a lot of modules in compose need php 5.6 or more.

    1. 1and1help says:

      Hi Diego,

      we are aware of that. Our developers are working on updates with high priority at the moment. As soon as we have concrete informations to share, we will let you know.

      Thanks for your patience,
      Michael, 1&1

  6. Rob says:

    Will 1&1 support installing Laravel and other more up to date frame works (mean stack stuff, etc)? If it does can you point to how to work within 1&1 to install/access it. IF not, why? and when, if at all, do you plan on getting this stuff updated to support these types of technologies?


    1. 1and1help says:

      Hi Rob,

      I am sorry, we have no plans to pre-install Laravel or other up-to-date frameworks on our shared hosting in the near future.

      If you are web developer, you might want to try out the 1&1 Cloud Severs (root version) as an alternative to a classic hosting package:

      Best regards,
      Michael, 1&1

      1. Nicolas.jablonski says:

        hello michael,

        does it means that the 1and1 shared hosting are not able to host a laravel installation ? Too much restrictions rights.

        i’m trying to install it without success and i wonder if that’s possible.

        thank you

        1. 1and1help says:

          Unfortunately, I can’t see informations on the Laravel website, which composer or php-cli version you need to install the framework by your own. If it’s running with PHP 5.5 on the command line, it might work.

          Newer php-cli versions are planned for the future, but currently we can’t give you an ETA.

          Best regards,
          Michael, 1&1

  7. Orlando says:

    Hi,the console show me PHP 4.4.9 (cgi-fcgi) (built: Feb 28 2017 11:31:58), how can I change it to PHP 5.6 CLI, because php-cgi does not support -S , thanks!

    1. 1and1help says:

      Hi Orlando,

      this is still the current status:

      The latest version you can get with us at the moment is php5.5-cli.

      Best regards,
      Michael, 1&1

  8. Andreas Anding says:

    When can we use PHP 7 on Command Line?

    1. 1and1help says:

      Hi Andreas,

      this is still the current status:

      Michael, 1&1

  9. Steve says:

    I have php7 installed now, but composer gives me the error: requires php >=5.6.0 -> your PHP version (5.4.45) does not satisfy that requirement. How can I force composer to use php7?

    1. 1and1help says:

      Hi Steve,

      at the moment the PHP versions you can use with us differ between browser commandos via http/s and the version you can use via command line.

      For command line scripts (and cronjobs as well) we only offer PHP up to PHP 5.5 (php5.5-cli).

      Regarding plans for updates, please read here:

      Michael, 1&1

  10. Russ says:

    This lack of php 5.6 or php 7 support on the command line is appalling. When are you going to fix it?

  11. 1and1help says:

    Hi Russ,

    It’s definitely on our agenda, but no final ETA yet, sorry.

    Best regards,
    Michael, 1&1

  12. Marouane says:

    Just run one commande to install PHP5.6,
    We are waiting to fix this problem

    1. 1and1help says:


      that might be true if you are running PHP on your own single root server. Our shared hosting infrastructure is much more complex than that, so running one simple command is unfortunately not enough. Updating the PHP versions has to be planned very carefully by our admins. That’s whats happening at the moment. They are working hard to deliver newer versions as soon as possible.

      Best regards,
      Michael, 1&1

  13. Cristian says:

    Hi, I have installed on my hosting site the php composer, but once the page is launched from the browser it says the following error despite the path is correct “Fatal error: require_once(): Failed opening required ‘../vendor/autoload.php’ (include_path=’.:/usr/lib/php5.6′)”, why – how can i fix it? Thanks in advance

    1. 1and1help says:

      Hi Cristian,

      this is the reason for the error message – and still the current status:

      Best regards,
      Michael, 1&1

      1. Cristian says:

        Ok but i how to fix it, i can not wait, i have moved the domain to have better services but i always find myself at the same point!

      2. Cristian says:

        Ok Then since I bought your hosting for more services I have to tell you I have to wait? I can not wait for you to create a disservice

        1. 1and1help says:

          Hi Cristian,

          at the moment there is no way to fix this in our shared hosting packages. As soon as we are rolling out updates to our servers, you should be able to use the latest composer versions.

          For now, maybe another hosting product would be a better solution for you. Don’t hesitate to contact us for a consultation:

          Best regards,
          Michael, 1&1

  14. Edmon says:


    After running successfully the commands you show in this tutorial, when I type the composer command, the message

    -bash: composer: command not found


    Anything else I should do to have it?


    1. Edmon says:

      Oh, got it , I should always use

      /usr/bin/php5.5-cli composer.phar


  15. Femi says:

    I have Php 7.0 install on my 1&1 Basic contract and I used mysql_connect() in my project. I have check the php setting on my CP but no version 5.6 or 5.5 there. What can I do to make changes to this version.


    1. 1and1help says:

      Hi Femi,

      we still offer PHP 5.6 in the PHP settings of your contract free of charge.

      If you want to use PHP 5.5, we can activate the PHP 5.5 Extended Support with an additional monthly fee for you. If you are interested in this, just e-mail us for further informations:

      Best regards,
      Michael, 1&1

  16. Mark says:

    I am trying to install composer with PHP 5.6> but Icant, are there any solution about this ? cos in admin panel is seems I have php 7. I dont undesrtand why I can use in ssh other php version this does not have logic

    1. 1and1help says:

      Hi Mark,

      I am sorry, but at the moment there is no workaround for this in our webhosting packages. Our dev team is still working on updates for php-cli. There is no ETA for it yet. We’ll keep all users updated on that subject in the future.

      Best regards,
      Michael, 1&1

  17. Robert Riso says:

    The initial download command: curl -sS | /usr/bin/php5.5-cli

    returns these errors:
    bash: /usr/bin/php5.5-cli: No such file or directory
    curl: (77) Problem with the SSL CA cert (path? access rights?)

  18. Robert Riso says:

    I got past the problem I reported – however, I have another:

    I’m running PHP7.0.21 for this website, but when I check the version in putty I get 5.3.3, and cannot install the Google API client library, which requires 5.4. How/where do I upgrade to 5.4 or better for the command line?

    1. 1and1help says:

      On command line you have to extend your php command to the following path:


      PHP 5.5 is currently the latest PHP version we offer on the command line.

      Best regards,
      Michael, 1&1

      1. Robert Riso says:

        /usr/bin/php5.5-cli is an empty directory. There is no php interpreter or symbolic link there.

        1. 1and1help says:

          Sorry for the irritation. We are not talking about shared hosting but your own root server? In this case you might have to define the default PHP version on your webserver. If you are using Plesk to configure your server applications, this link might help:

          Best regards,
          Michael, 1&1

  19. Bernard says:

    i have a problem when a using php in command line with ssh,
    please i want to set php in php6 by default!how can i do?

    1. 1and1help says:

      Hi Bernard,

      PHP 6 was planned but never released. In the end, they rolled out PHP 5.4 instead. You would have to use the path like this:


      The next step would be PHP 7, which we dont support for CLI yet (latest version on our shared servers: /usr/bin/php5.5-cli). We plan to update the versions in the future, but no ETA for this yet.

      Best regards,
      Michael, 1&1

  20. Hi,
    It’s been so long that I can’t update my website with *composer* due to PHP version problem. I select php7 but in console I can not find php7.
    What happen ?

    1. 1and1help says:


      you can find the reason for this here:

      This is the current status, our IT is working on updates for the future.

      Best regards,
      Michael, 1&1

  21. Alexis Petithomme says:

    I try to launch a crontab with php but the best I obtain is “Installed PHP Version is too old! Required minimum version is PHP 5.6 (Installed: 5.4.45)”.
    This cron job is used to send notifications, I cannot work without these.
    Have you any solution ?
    The best I have for now is to move to another hosting service…

    1. 1and1help says:

      Hi Alexis,

      in the current situation, php for command line is only installed up to php5.5-cli.

      Maybe a workaround could be to open the file in your cron via curl or wget.

      Best regards,
      Michael, 1&1

      1. Alexis Petithomme says:

        Thank you for your answer but I don’t know how to open a yii file with wget. The command line I have to install is “30 * * * * /path/to/humhub/protected/yii cron/hourly”
        I don’t know how to send a parameter to yii with wget…
        Can you help me ?

        1. 1and1help says:

          Sorry, we have no experience with Yii. Maybe you might ask the Yii developers if there is a workaround to run this with curl or wget.

          Michael, 1&1

Leave a Reply

Your email address will not be published. Required fields are marked *