1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Installing composer on shared hosting

Discussion in 'Apache' started by sarahk, Aug 13, 2017.

  1. #1
    I've got a bunch of small sites on a shared host and I'm trying to install composer onto a subdomain

    Because it's shared hosting I'm using PHPShell to emulate a terminal and getting an error
    SEMrush
    $ curl -sS https://getcomposer.org/installer | php
    Some settings on your machine make Composer unable to work properly.
    Make sure that you fix the issues listed below and run this script again:
    
    The suhosin.executor.include.whitelist setting is incorrect.
    Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):
        suhosin.executor.include.whitelist = phar 
    Code (markup):
    That looks pretty self explanatory except that this doesn't work
    php -d suhosin.executor.include.whitelist=phar
    Code (markup):
    any ideas on what I need to do?
     
    sarahk, Aug 13, 2017 IP
    SEMrush
  2. RHS-Chris

    RHS-Chris Active Member

    Messages:
    989
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    80
    #2
    Hello there,

    There are numerous factors that are unknowns that may affect this, it really depends on how your shared host has things set up on the back end. Using an SSH connection means that when you query/run PHP scripts, it will use the systems version of PHP, which may not be necessarily the version of PHP running your website . Here are a few quick things to try:

    1. Create a web page to show your PHP variables. Create a new file (name is what ever your wish, just make sure it is a .php extension) and place the following into it:
      <?
      phpinfo();
      ?>
      Code (markup):
    2. Call the script from your browser then look at the PHP version as well as the ini file location.
    3. Run the following commands from your terminal to see if they match:
      php -v
      php -i | grep ini
      Code (markup):
    4. If the versions and the ini path match, you will not be able to modify the php.ini file without root access. You can try placing a php.ini file in your websites folder with the code in it, this may work on some hosts.
    5. If they do not match, check within your cPanel (assuming you are using cPanel) to see if there is a section to modify your PHP settings (the latest version of cPanel allows users to edit these settings, assuming your host has set it up this way.
    6. If the above still has you stuck, I would contact your host as ask them for support.

    Regards,
    Chris
     
    RHS-Chris, Aug 13, 2017 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    23,577
    Likes Received:
    3,183
    Best Answers:
    87
    Trophy Points:
    615
    #3
    We had a match. Thanks for the info!

    In the meantime, I realised that the PHP version is too low for the scripts I want to run so I'm going to move that site over to Google Cloud and use my $300 voucher to run the site.
     
    sarahk, Aug 13, 2017 IP