あれ!GDがない!! phpにGDインストール Cent OS
すんなり入ったのであまり面白くない記事ですね。はい。
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
* base: ftp.nara.wide.ad.jp
* extras: ftp.nara.wide.ad.jp
* rpmforge: mirror.fairway.ne.jp
* updates: ftp.nara.wide.ad.jp
base | 1.1 kB 00:00
extras | 2.1 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 1.9 kB 00:00
updates/primary_db | 582 kB 00:00
107 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.1.6-40.el5_9 set to be updated
--> Processing Dependency: php-common = 5.1.6-40.el5_9 for package: php-gd
--> Running transaction check
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-mbstring
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-pdo
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-xmlrpc
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-imap
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-cli
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-xml
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-odbc
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-mysql
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-ldap
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-ncurses
---> Package php-common.x86_64 0:5.1.6-40.el5_9 set to be updated
--> Running transaction check
--> Processing Dependency: php = 5.1.6-39.el5_8 for package: php-devel
---> Package php.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-cli.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-imap.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-ldap.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-mbstring.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-mysql.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-ncurses.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-odbc.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-pdo.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-xml.x86_64 0:5.1.6-40.el5_9 set to be updated
---> Package php-xmlrpc.x86_64 0:5.1.6-40.el5_9 set to be updated
--> Running transaction check
---> Package php-devel.x86_64 0:5.1.6-40.el5_9 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Updating:
php-gd x86_64 5.1.6-40.el5_9 updates 119 k
Updating for dependencies:
php x86_64 5.1.6-40.el5_9 updates 2.4 M
php-cli x86_64 5.1.6-40.el5_9 updates 2.2 M
php-common x86_64 5.1.6-40.el5_9 updates 154 k
php-devel x86_64 5.1.6-40.el5_9 updates 505 k
php-imap x86_64 5.1.6-40.el5_9 updates 56 k
php-ldap x86_64 5.1.6-40.el5_9 updates 39 k
php-mbstring x86_64 5.1.6-40.el5_9 updates 1.0 M
php-mysql x86_64 5.1.6-40.el5_9 updates 91 k
php-ncurses x86_64 5.1.6-40.el5_9 updates 44 k
php-odbc x86_64 5.1.6-40.el5_9 updates 56 k
php-pdo x86_64 5.1.6-40.el5_9 updates 67 k
php-xml x86_64 5.1.6-40.el5_9 updates 104 k
php-xmlrpc x86_64 5.1.6-40.el5_9 updates 59 k
Transaction Summary
======================================================================================================================================================
Install 0 Package(s)
Upgrade 14 Package(s)
Total download size: 6.8 M
Downloading Packages:
(1/14): php-ldap-5.1.6-40.el5_9.x86_64.rpm | 39 kB 00:00
(2/14): php-ncurses-5.1.6-40.el5_9.x86_64.rpm | 44 kB 00:00
(3/14): php-odbc-5.1.6-40.el5_9.x86_64.rpm | 56 kB 00:00
(4/14): php-imap-5.1.6-40.el5_9.x86_64.rpm | 56 kB 00:00
(5/14): php-xmlrpc-5.1.6-40.el5_9.x86_64.rpm | 59 kB 00:00
(6/14): php-pdo-5.1.6-40.el5_9.x86_64.rpm | 67 kB 00:00
(7/14): php-mysql-5.1.6-40.el5_9.x86_64.rpm | 91 kB 00:00
(8/14): php-xml-5.1.6-40.el5_9.x86_64.rpm | 104 kB 00:00
(9/14): php-gd-5.1.6-40.el5_9.x86_64.rpm | 119 kB 00:00
(10/14): php-common-5.1.6-40.el5_9.x86_64.rpm | 154 kB 00:00
(11/14): php-devel-5.1.6-40.el5_9.x86_64.rpm | 505 kB 00:00
(12/14): php-mbstring-5.1.6-40.el5_9.x86_64.rpm | 1.0 MB 00:00
(13/14): php-cli-5.1.6-40.el5_9.x86_64.rpm | 2.2 MB 00:00
(14/14): php-5.1.6-40.el5_9.x86_64.rpm | 2.4 MB 00:00
------------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.6 MB/s | 6.8 MB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : php-common 1/28
Updating : php-pdo 2/28
Updating : php-cli 3/28
Updating : php 4/28
Updating : php-mysql 5/28
Updating : php-ncurses 6/28
Updating : php-devel 7/28
Updating : php-ldap 8/28
Updating : php-odbc 9/28
Updating : php-imap 10/28
Updating : php-mbstring 11/28
Updating : php-gd 12/28
Updating : php-xmlrpc 13/28
Updating : php-xml 14/28
Cleanup : php-mysql 15/28
Cleanup : php-ncurses 16/28
Cleanup : php-devel 17/28
Cleanup : php-ldap 18/28
Cleanup : php-odbc 19/28
Cleanup : php-imap 20/28
Cleanup : php-mbstring 21/28
Cleanup : php-gd 22/28
Cleanup : php-pdo 23/28
Cleanup : php 24/28
Cleanup : php-xmlrpc 25/28
Cleanup : php-xml 26/28
Cleanup : php-common 27/28
Cleanup : php-cli 28/28
Updated:
php-gd.x86_64 0:5.1.6-40.el5_9
Dependency Updated:
php.x86_64 0:5.1.6-40.el5_9 php-cli.x86_64 0:5.1.6-40.el5_9 php-common.x86_64 0:5.1.6-40.el5_9 php-devel.x86_64 0:5.1.6-40.el5_9
php-imap.x86_64 0:5.1.6-40.el5_9 php-ldap.x86_64 0:5.1.6-40.el5_9 php-mbstring.x86_64 0:5.1.6-40.el5_9 php-mysql.x86_64 0:5.1.6-40.el5_9
php-ncurses.x86_64 0:5.1.6-40.el5_9 php-odbc.x86_64 0:5.1.6-40.el5_9 php-pdo.x86_64 0:5.1.6-40.el5_9 php-xml.x86_64 0:5.1.6-40.el5_9
php-xmlrpc.x86_64 0:5.1.6-40.el5_9
Complete!
確認(getimagesizeを使ってみた。)
$img = getimagesize("../img_dir/25-1.gif");
print_r($img); $imgを連想配列で表示
↓
Array ( [0] => 793 [1] => 717 [2] => 1 [3] => width="793" height="717" [bits] => 8 [channels] => 3 [mime] => image/gif )