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'm using Ubuntu 11.04 LTS server, it's a new install on a VPS box from MediaTemple (their ve server). I'm trying to install PHP 5.4.3 on this box, but I'm having a common problem not matter what version I get. I'm trying to get the php-cgi process, so I do the command apt-get install php-cgi and that installs, but does not provide me with the php-cgi executable. I need this so that I can run php-cgi -b 127.0.0.1:9000 and have it has a FastCGI process for my nginx install. Any idea what I can do to get this to work, bonus points if you can get this to work with PHP 5.4.3, because all I can seem to install is PHP 5.3.5.

share|improve this question
    
How about pasting the output from your apt-get (including a -V on the command)? Also, the content of /etc/apt/sources.list. Lastly, once installed, the output of, dpkg -L php-cgi. –  EightBitTony Jun 7 '12 at 9:44
add comment

1 Answer 1

I believe the version of PHP5 CGI in Ubuntu 11.04 LTS is,

php5-cgi (5.3.5-1ubuntu7.8) [security]

according to this page. You can check which versions are present in other Ubuntu releases on that page. If you want 5.4.3 you'll either need to find another repository with it in, or download and compile your own version.

It appears you were installing the php5-cli package which does not contain the relevant php5-cgi binaries.

share|improve this answer
1  
Also, the name of the executable in the Ubuntu package is php5-cgi not php-cgi –  DerfK Jun 7 '12 at 12:59
    
@DerfK user@ts:~# apt-get install php5-cli Reading package lists... Done Building dependency tree Reading state information... Done php5-cli is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. user@ts:~# php -v PHP 5.4.3-4~natty+1 (cli) (built: May 17 2012 12:52:08) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies user@ts:~# php5-cli -v -bash: php5-cli: command not found user@ts:~# –  Mark Tomlin Jun 7 '12 at 19:23
    
@Derfk user@ve:~# php -v PHP 5.3.5-1ubuntu7.8 with Suhosin-Patch (cli) (built: May 4 2012 00:50:15) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies user@ve:~# php5-cli -v -bash: php5-cli: command not found user@ve:~# php-cli -v -bash: php-cli: command not found user@ve:~# –  Mark Tomlin Jun 7 '12 at 19:29
1  
@MarkTomlin php-cli does NOT have the CGI interface and can't be used for your fastcgi service. You need the program php5-cgi in the package php5-cgi which you have already installed, it's just an older version. –  DerfK Jun 7 '12 at 22:39
    
I had to install the php5-cgi, but once I did, everything ways working. Sorry for being so dense. +1 –  Mark Tomlin Jun 7 '12 at 23:06
add comment

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.