LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-08-2010, 06:51 PM   #1
wutanghax0r
LQ Newbie
 
Registered: Jan 2010
Posts: 7

Rep: Reputation: 0
having trouble updating php-cli


[Log in to get rid of this advertisement]
Hi. I have updated php on my fedora 6 installation.
when I run phpinfo from a browser it shows version 5.3.1
but when I run it form the command line it shows version 5.2.4
php-cli5.3.1 was installed when I updated. But I tried manually downloading and installing a php-cli5.3.1 rpm and as I suspected it told me it was already installed.
What Do I need to do to make my computer run php-cli5.3.1

ps. I know my fedora installation is old! ...but it's just a private local test box not accessible from the internet. :-p
   
Old 02-09-2010, 06:35 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 1,326

Rep: Reputation: 132Reputation: 132
All the php packages are built from the same src rpm so they should be the same version... maybe you have an extra version floating around:

can you do a 'which php' and compare it with -
Code:
    $ rpm -ql php-cli
    /usr/bin/phar
    /usr/bin/phar.phar
    /usr/bin/php
    /usr/bin/php-cgi
    /usr/share/doc/php-cli-5.3.1 
    /usr/share/doc/php-cli-5.3.1/README
    /usr/share/doc/php-cli-5.3.1/README.FastCGI
    /usr/share/man/man1/php.1.gz
If it matches the correct location according to the rpm, then please verify the rpm to see if any files have been modified:

Code:
rpm -V php-cli
cheers
   
Old 02-09-2010, 03:13 PM   #3
wutanghax0r
LQ Newbie
 
Registered: Jan 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your reply!!

It looks like they don't match:

# which php
/usr/local/bin/php

# rpm -ql php-cli
/usr/bin/phar
/usr/bin/phar.phar
/usr/bin/php
/usr/bin/php-cgi
/usr/share/doc/php-cli-5.3.1
/usr/share/doc/php-cli-5.3.1/README
/usr/share/doc/php-cli-5.3.1/README.FastCGI
/usr/share/man/man1/php.1.gz

I guess the /usr/local/bin/php is the old version
and /usr/bin/php is the current one. I ran phpinfo from the command line using /usr/bin/php and It showed version 5.3.1

What do I have to do to have that version be used when I just type:
php scriptname.php
from the command line. (sorry if this is a noob question :-] I'm learning)
   
Old 02-09-2010, 10:24 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 1,326

Rep: Reputation: 132Reputation: 132
Two choices: get rid of the old version or change your PATH order, probably simpler to get rid of the old version if you don't need it.

cheers
   
Old 02-10-2010, 10:23 AM   #5
wutanghax0r
LQ Newbie
 
Registered: Jan 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Awesome! I guess I assumed the new version wasn't in the path.
I removed the old php file and now php5.3.1 is used.
Thanks again!
   
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble using openSUSE gfxboot cli tool jmite Linux - Newbie 1 01-27-2009 10:55 PM
php cli can't run php file outside its path asiandude Programming 4 12-11-2008 02:50 PM
Mandriva 2006 boots to CLI after updating to KDE 3.5.2 hiazle Mandriva 7 07-05-2006 11:40 AM
Php Cli skiflyer Debian 1 01-11-2005 12:50 PM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 07:50 AM


All times are GMT -5. The time now is 02:22 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Free Publications
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration