[Ask] perbedaan "php -v" dan "/usr/bin/php -v"

Discussion in 'Masalah Teknik dan Keamanan' started by priz_, 5 Aug 2012.

Thread Status:
Not open for further replies.
  1. priz_

    priz_ Beginner 1.0

    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Dear all,

    Mau tanya, saya ada problem sedikit dengan menggunaan binary php. Karena ada perbedaan output ketika saya ketik php -v dan /usr/bin/php -v di server yang sama (CentOS release 5.7 (Final).

    Berikut infonya.

    Code:
    [root@mars bin]# pwd
    /usr/bin
    
    [root@mars bin]# ls -la /usr/bin/php
    -rwxr-xr-x 1 root root 2862064 Nov 30  2010 /usr/bin/php
    
    [root@mars bin]# /usr/bin/php -v
    PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:46) 
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    
    [root@mars bin]# ./php -v
    PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:46) 
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    [root@mars bin]# 
    
    [root@mars bin]# php -v
    PHP 5.3.15 (cli) (built: Aug  5 2012 04:48:43) 
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
        with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd., and
        with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
    [root@mars bin]# 
    
    

    Tolong pencerahannya


    Trims,
     
  2. cpserv

    cpserv Expert 1.0

    Messages:
    866
    Likes Received:
    123
    Trophy Points:
    43
    phpnya ada 2 mungkin? coba aja cek pake command "which"

    Code:
    which php
     
    priz_ likes this.
  3. priz_

    priz_ Beginner 1.0

    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hehe, Ok sip thanks pak,

    Code:
    [root@mars bin]# which php
    /usr/local/bin/php
    
    [root@mars bin]# mv /usr/bin/php /usr/bin/php-orig
    [root@mars bin]# ln -s /usr/local/bin/php /usr/bin/php
    
    [root@mars bin]# /usr/bin/php -v
    PHP 5.3.15 (cli) (built: Aug  5 2012 04:48:43) 
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
        with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd., and
        with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
    [root@mars bin]#
    
    
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...