Confused about installing PHP5 cli
johnbkim at gmail.com
Mon Jul 13 22:29:29 PDT 2009
Ah, so I always had CLI version there. I just didn't know it was in
/opt/local/bin. Thanks for the command to upgrade to 5.3.
There is PHP4 at /usr/local/bin (came w/ OSX, I think), and my PATH variable
is set so that bash shell looks in /usr/local/bin before /opt/local/bin.
What's the best way to handle this? Should I just modify the PATH
environment variable so that bash looks in /opt/local/bin first?
Ryan Schmidt-24 wrote:
> On Jul 13, 2009, at 23:50, mrbigpants wrote:
>> I need php5 to work in cli. I just did 'sudo port install php5' and
>> it says,
>> Image error: Another version of this port (php5 @5.2.10_1+apache2
>> +macosx) is
>> already active.
> Correct. You already had php5 installed. You should have used "sudo
> port upgrade php5" to get php 5.3.0, instead of using "sudo port
> install" again.
> Now that you have used "sudo port install", you can activate 5.3.0 by
> deactivating the 5.2.10 version and activating the 5.3.0 version.
> sudo port deactivate php5 @5.2.10_1+apache2+macosx
> sudo port activate php5 @5.3.0_0+apache2+macosx
>> So apparently php5 is already installed as an apache module. At
>> this point,
>> what must I do to get it to work on the command line? Do I have to
>> uninstall and reinstall the port?
>> (There is php available to cli currently, but it's php4.)
> The php4 and php5 ports always install the php cli. It cannot be
> turned off. php5 installs it at /opt/local/bin/php while php4
> installs it at /opt/local/bin/php4.
> If you do not need the apache2 module or any web support, you can
> save yourself some time next time by using the +no_web variant. See
> "port variants php5" for the list of available variants.
> macports-users mailing list
> macports-users at lists.macosforge.org
View this message in context: http://www.nabble.com/Confused-about-installing-PHP5-cli-tp24473478p24473907.html
Sent from the MacPorts - Users mailing list archive at Nabble.com.
More information about the macports-users