"리눅스 PHP 버전 확인"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 2명의 중간 판 4개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==방법 1: php==
==방법 1: php==
* CentOS, 우분투 공통
* CentOS, 우분투 공통
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -v
[root@zetawiki ~]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
7번째 줄: 7번째 줄:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
     with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
     with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php --version
[root@zetawiki ~]# php --version
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
... (생략)
... (생략)
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -r "echo phpversion();"
[root@zetawiki ~]# php -r "echo phpversion();"
5.2.10
5.2.10
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -r 'echo PHP_VERSION;'
[root@zetawiki ~]# php -r 'echo PHP_VERSION;'
5.2.10
5.2.10
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -i | grep 'PHP Version'
[root@zetawiki ~]# php -i | grep 'PHP Version'
PHP Version => 5.3.3
PHP Version => 5.3.3
PHP Version => 5.3.3
PHP Version => 5.3.3
</source>
</syntaxhighlight>


==방법 2: 우분투==
==방법 2: php-config==
{{참고|php-config}}
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php-config --version
5.5.30
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php-config --vernum
50530
</syntaxhighlight>
 
==방법 3: 우분투==
* dkpg
* dkpg
<source lang='cli'>
<syntaxhighlight lang='console'>
root@zetawiki:~# dpkg -l php5
root@zetawiki:~# dpkg -l php5
Desired=Unknown/Install/Remove/Purge/Hold
Desired=Unknown/Install/Remove/Purge/Hold
37번째 줄: 48번째 줄:
+++-===================-==============-==============-===========================================
+++-===================-==============-==============-===========================================
ii  php5                5.5.9+dfsg-1ub all            server-side, HTML-embedded scripting langua
ii  php5                5.5.9+dfsg-1ub all            server-side, HTML-embedded scripting langua
</source>
</syntaxhighlight>
:→ 5.5.9
:→ 5.5.9


==방법 3: CentOS==
==방법 4: CentOS==
* rpm
* rpm
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa php
[root@zetawiki ~]# rpm -qa php
php-5.2.10-1.el5.centos
php-5.2.10-1.el5.centos
</source>
</syntaxhighlight>
:→ 5.2.10
:→ 5.2.10


* yum
* yum
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# yum list installed php
[root@zetawiki ~]# yum list installed php
... (생략)
... (생략)
Installed Packages
Installed Packages
php.x86_64                                        5.2.10-1.el5.centos                                        installed
php.x86_64                                        5.2.10-1.el5.centos                                        installed
</source>
</syntaxhighlight>
:→ 5.2.10
:→ 5.2.10


==같이 보기==
==같이 보기==
*[[PHP 모듈 설치 확인]]
* [[PHP 버전 목록]]
*[[php.ini의 위치]]
* [[php.ini의 위치]]
*[[아파치 버전 확인]]
* [[PHP_VERSION]]
*[[MySQL 버전 확인]]
* [[아파치 버전 확인]]
*[[리눅스 버전 확인]]
* [[리눅스 버전 확인]]
*[[The program 'php' is currently not installed.]]
* [[MySQL 버전 확인]]
*[[PHP phpversion()]]
* [[PHP phpversion()]]
*[[PHP_VERSION]]
* [[PHP 모듈 설치 확인]]
* [[The program 'php' is currently not installed.]]


[[분류:리눅스]]
[[분류:리눅스]]
[[분류: 버전]]
[[분류:버전 확인]]

2021년 9월 24일 (금) 23:17 기준 최신판

1 방법 1: php[ | ]

  • CentOS, 우분투 공통
[root@zetawiki ~]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
[root@zetawiki ~]# php --version
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
... (생략)
[root@zetawiki ~]# php -r "echo phpversion();"
5.2.10
[root@zetawiki ~]# php -r 'echo PHP_VERSION;'
5.2.10
[root@zetawiki ~]# php -i | grep 'PHP Version'
PHP Version => 5.3.3
PHP Version => 5.3.3

2 방법 2: php-config[ | ]

[root@zetawiki ~]# php-config --version
5.5.30
[root@zetawiki ~]# php-config --vernum
50530

3 방법 3: 우분투[ | ]

  • dkpg
root@zetawiki:~# dpkg -l php5
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
+++-===================-==============-==============-===========================================
ii  php5                5.5.9+dfsg-1ub all            server-side, HTML-embedded scripting langua
→ 5.5.9

4 방법 4: CentOS[ | ]

  • rpm
[root@zetawiki ~]# rpm -qa php
php-5.2.10-1.el5.centos
→ 5.2.10
  • yum
[root@zetawiki ~]# yum list installed php
... (생략)
Installed Packages
php.x86_64                                         5.2.10-1.el5.centos                                         installed
→ 5.2.10

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}