Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to install composer with the command:

curl -s https://getcomposer.org/installer | php

And I am getting this error:

PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
#!/usr/bin/env php
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

Your PHP (5.3.2-1ubuntu4.18) is quite old, upgrading to PHP 5.3.4 or higher is recommended.
Composer works with 5.3.2+ for most people, but there might be edge case issues.

Downloading...
Download failed: Unable to access https://getcomposer.org/composer.phar
Downloading...
Download failed: Unable to access https://getcomposer.org/composer.phar
Downloading...
Download failed: Unable to access https://getcomposer.org/composer.phar
The download failed repeatedly, aborting.

Any idea?

share|improve this question

2 Answers 2

I just tried it on mine:

[alexus@wcmisdlin02 ~]$ curl -s https://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

Your PHP (5.3.3) is quite old, upgrading to PHP 5.3.4 or higher is recommended.
Composer works with 5.3.2+ for most people, but there might be edge case issues.

Downloading...

Composer successfully installed to: /home/alexus/composer.phar
Use it: php composer.phar
[alexus@wcmisdlin02 ~]$ php -v
PHP 5.3.3 (cli) (built: Jun 27 2012 14:13:03) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[alexus@wcmisdlin02 ~]$ 

Try to updating your PHP package first and give it a go again.

seems like some php extensisons are missing on your end, here is what I have installed on my end:

[alexus@wcmisdlin02 ~]$ rpm -qa | grep ^php
php-mysql-5.3.3-14.el6_3.x86_64
php-pear-1.9.4-4.el6.noarch
php-pecl-xhprof-0.9.2-5.el6.x86_64
php-gd-5.3.3-14.el6_3.x86_64
php-pear-Console-Color-1.0.3-1.el6.noarch
php-mbstring-5.3.3-14.el6_3.x86_64
php-pdo-5.3.3-14.el6_3.x86_64
php-common-5.3.3-14.el6_3.x86_64
php-soap-5.3.3-14.el6_3.x86_64
phpMyAdmin-3.5.4-1.el6.noarch
php-php-gettext-1.0.11-3.el6.noarch
php-xml-5.3.3-14.el6_3.x86_64
php-pecl-apc-3.1.9-2.el6.x86_64
php-pear-Console-Table-1.1.4-1.el6.2.noarch
php-mcrypt-5.3.3-1.el6.x86_64
php-cli-5.3.3-14.el6_3.x86_64
php-5.3.3-14.el6_3.x86_64
[alexus@wcmisdlin02 ~]$ 
share|improve this answer
    
I did an update/upgrade -> still same –  Jan1337z Jan 16 '13 at 17:48
    
I'm looking at code, it seems like something from your PHP is missing and it's not missing in mine, can you look at developer's site see if they have requirements for PHP as well (try to install them). –  alexus Jan 16 '13 at 17:49
    
As far as I can see (getcomposer.org/doc/…), there are no further requirements... any other idea? –  Jan1337z Jan 16 '13 at 17:55
    
check my list, see what's missing... –  alexus Jan 16 '13 at 17:59
    
Up for you help. Couldnt solf it so I updated my VM from 9.* to 10.* and tada: working. (Yes, I know this not the best way to do it) –  Jan1337z Jan 17 '13 at 9:27
up vote 0 down vote accepted

Solved: disabling safe_mode did the trick!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.