우분투16 php-mcrypt 설치

(우분투 php-mcrypt 설치에서 넘어옴)
  다른 뜻에 대해서는 CentOS php-mcrypt 설치 문서를 참조하십시오.

1 개요[ | ]

apt install php-mcrypt
우분투 php-mcrypt 설치
우분투16 php-mcrypt 설치
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)

2 확인[ | ]

Console
Copy
root@zetawiki:~# php -m | grep mcrypt
root@zetawiki:~# php -r "mcrypt_create_iv();"
PHP Fatal error:  Uncaught Error: Call to undefined function mcrypt_create_iv() in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
Console
Copy
root@zetawiki:~# apt list php-mcrypt
Listing... Done
php-mcrypt/xenial 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all
N: There is 1 additional version. Please use the '-a' switch to see it

3 설치[ | ]

Console
Copy
root@zetawiki:~# apt install php-mcrypt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libmcrypt4 php7.1-mcrypt
Suggested packages:
  libmcrypt-dev mcrypt
The following NEW packages will be installed:
  libmcrypt4 php-mcrypt php7.1-mcrypt
0 upgraded, 3 newly installed, 0 to remove and 93 not upgraded.
Need to get 82.8 kB of archives.
After this operation, 306 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Console
Copy
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libmcrypt4 amd64 2.5.8-3.3 [63.0 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-mcrypt amd64 7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1 [14.5 kB]
Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php-mcrypt all 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 [5,320 B]
Fetched 82.8 kB in 3s (27.4 kB/s)     
Selecting previously unselected package libmcrypt4.
(Reading database ... 87229 files and directories currently installed.)
Preparing to unpack .../libmcrypt4_2.5.8-3.3_amd64.deb ...
Unpacking libmcrypt4 (2.5.8-3.3) .......................................................] 
Selecting previously unselected package php7.1-mcrypt...................................] 
Preparing to unpack .../php7.1-mcrypt_7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.1-mcrypt (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...................] 
Selecting previously unselected package php-mcrypt......................................] 
Preparing to unpack .../php-mcrypt_1%3a7.1+53~ubuntu16.04.1+deb.sury.org+1_all.deb ...
Unpacking php-mcrypt (1:7.1+53~ubuntu16.04.1+deb.sury.org+1) ...........................] 
Processing triggers for libapache2-mod-php7.1 (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up libmcrypt4 (2.5.8-3.3) ...
Setting up php7.1-mcrypt (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ..................] 
Progress: [ 75%] [#####################################################.................] 
Creating config file /etc/php/7.1/mods-available/mcrypt.ini with new version
Setting up php-mcrypt (1:7.1+53~ubuntu16.04.1+deb.sury.org+1) ...##########.............] 
Processing triggers for libc-bin (2.23-0ubuntu9) ...################################....] 
Processing triggers for libapache2-mod-php7.1 (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...

4 확인 2[ | ]

Console
Copy
root@zetawiki:~# apt list php-mcrypt
Listing... Done
php-mcrypt/xenial,now 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all [installed]
N: There is 1 additional version. Please use the '-a' switch to see it
Console
Copy
root@zetawiki:~# php -m | grep mcrypt
mcrypt
Console
Copy
root@zetawiki:~# php -r "mcrypt_create_iv();"
PHP Warning:  mcrypt_create_iv() expects at least 1 parameter, 0 given in Command line code on line 1

5 같이 보기[ | ]

  • PHP 파일 다운로드 구현 2 (한글 파일명 지원)
    제가 파일다운로드 관련된 것이 서툴러서 파일 다운로드 부분을 인용하였습니다. 죄송합니다.
  • PHP에서 오라클 DB 사용
    감사합니당. YoWu
  • PHP 파일 업로드 구현
    파일정보 출력에서 $name $ext 가 정상적으로 출력되나요? 전부 echo의 쌍따옴표안에 있는데? 일리단사오육칠
  • PHP 파일 업로드 구현
    PHP echo에서 쌍따옴표 안의 변수는 해석되어 출력됩니다. 위 소스에서도 $name와 $ext가 두껍게 나와있죠? 일반 문자열과는 다르다는 표시죠.J Jmnote
  • PHP 파일 다운로드 구현 2 (한글 파일명 지원)
    'Windows NT 6.1' << 이부분은 접속한 윈도우의 플랫폼을 뜻하는걸로 압니다. ie11 접속하면 다음과 같이 바뀌었고 Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko rv:11.0 << 이부분이 Anmkst
  • Lib my.php
    Fatal error: Uncaught Error: Call to undefined function insert_rows() in D:\xampp\htdocs\naru\import_excel.php:38 Stack trace: #0 {main} thrown in D:\xampp\htdo 신정섭
  • Lib my.php
    함수 query()를 사용하면 됩니다. 예시 추가했으니 참고바랍니다.J Jmnote
  • 로또번호 생성
    초보를 위한 개발 실습 과제로군요 ㅎㅎ Pinkcrimson