Background Image
응용개발
2018.03.07 09:35

CUBRID PHP 드라이버 빌드와 연동방법

조회 수 3763 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

CentOS 7 + Apache 2.4.6 + PHP 5.4.16 + CUBRID PHP 드라이버 연동하는 방법입니다.


1, Apache 설치

[root@localhost ~]# yum -y install httpd httpd-devel                                                                                         

[root@localhost ~]# /usr/sbin/httpd -v

Server version: Apache/2.4.6 (CentOS)

Server built:   Oct 19 2017 20:39:16


2, PHP 설치

[root@localhost ~]# yum -y install php php-devel php-pear                                                                                

[root@localhost ~]# php -v

PHP 5.4.16 (cli) (built: Nov 15 2017 16:33:54)

Copyright (c) 1997-2013 The PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies


3, CUBRID PHP 빌드에 필요한 라이브러리 설치

[root@localhost ~]# yum -y install ncurses* gcc gcc-c++ libstdc++ libtool                                                             

[root@localhost ~]# yum list ncurses* gcc gcc-c++ libstdc++ libtool


4, CUBRID PHP 드라이버 다운로드 및 압축해제

[root@localhost ~]# wget http://ftp.cubrid.org/CUBRID_Drivers/PHP_Driver/10.1.0/Linux/CUBRID-PHP-10.1.0.0003.src.tar.gz

[root@localhost ~]# tar xvfz CUBRID-PHP-10.1.0.0003.src.tar.gz


5, CUBRID PHP 드라이버 빌드

[root@localhost ~]# cd cubrid-php                                                                                                               

[root@localhost cubrid-php]# phpize

Configuring for:

PHP Api Version:         20100412

Zend Module Api No:      20100525

Zend Extension Api No:   220100525

[root@localhost cubrid-php]# ./configure

[root@localhost cubrid-php]# make


6, cubrid.so 모듈 복사

[root@localhost cubrid-php]# cd modules                                                                                                      

[root@localhost modules]# ls -al

합계 1812

drwxr-xr-x.  2 root root      40  3월  6 14:59 .

drwxrwxr-x. 13  500  500    4096  3월  6 14:59 ..

-rw-r--r--.  1 root root     922  3월  6 14:59 cubrid.la

-rwxr-xr-x.  1 root root 1845680  3월  6 14:59 cubrid.so

[root@localhost modules]# cp cubrid.* /usr/lib64/php/modules


7, php.ini 환경설정에 cubrid.so 등록

[root@localhost modules]# vi /etc/php.ini                                                                                                      

; Directory in which the loadable extensions (modules) reside.

http://php.net/extension-dir

; extension_dir = "./"

; On windows:

; extension_dir = "ext"

extension = cubrid.so


8, PHP info.php 파일 생성

[root@localhost modules]# cd /var/www/html                                                                                                 

[[root@localhost html]# echo "<?php phpinfo(); ?>" > /var/www/html/info.php


9, Apache 구동과 CUBRID PHP CCI Vserion 확인

[root@localhost html]# systemctl restart httpd                                                                                                

[root@localhost html]# systemctl status httpd

 httpd.service - The Apache HTTP Server

   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

   Active: active (running) since 화 2018-03-06 15:22:22 KST; 8s ago

[root@localhost html]# php /var/www/html/info.php | grep CCI

CCI Version => 10.0.0


10, CUBRID 설치와 PHP 매뉴얼

참조: PHP 드라이버는 CUBRID 버전별로 관리되고 있어 DB서버에 설치한 CUBRID 버전과 같은 PHP 드라이버를 다운로드 받아 사용해 주세요.

  1. Windows에서 32bit 버전의 PHP 설치 후 CUBRID와 연동 실패 시 해결 방법

    Date2016.03.28 Category응용개발 By진우진 Views4523
    Read More
  2. Invalid XASL tree node content 에러

    Date2016.04.26 Category운영관리 By손승일 Views4477
    Read More
  3. cubrid plandump ( plan cache정보확인)

    Date2015.12.29 Category운영관리 By주현 Views4300
    Read More
  4. 큐브리드 마스터 소켓 디렉토리 변경방법

    Date2016.07.05 Category운영관리 By정만영 Views4218
    Read More
  5. 스키마 및 인덱스 선언에 따른 최대 용량 산정을 위한 ROW SIZE 확인

    Date2016.03.21 Category질의작성 By성진 Views4178
    Read More
  6. Cubrid는 어떤 쿼리를 동일한 쿼리로 판단할까?

    Date2015.12.30 Category질의작성 By이상신 Views4010
    Read More
  7. CUBRID PHP 드라이버 빌드와 연동방법

    Date2018.03.07 Category응용개발 By정만영 Views3763
    Read More
  8. subquery를 이용한 튜닝예제

    Date2016.12.27 Category질의작성 By김창휘 Views3322
    Read More
  9. 테이블 명세서 쿼리

    Date2017.08.04 Category질의작성 By성진 Views3165
    Read More
  10. JBoss 사용 시 statement pooling 설정

    Date2016.12.16 Category기타 By손승일 Views2924
    Read More
  11. CUBRID 와 DBCP의 관계

    Date2016.12.14 Category응용개발 By엄기호 Views2793
    Read More
  12. loose index scan을 활용한 효과적인 쿼리 튜닝 방안

    Date2017.06.01 Category질의작성 By박세훈 Views2409
    Read More
  13. CUBRID 브로커와 시스템 메모리

    Date2019.03.12 Category운영관리 By정만영 Views2367
    Read More
  14. 윈도우 OS에서 java sp 사용 시 Java VM is not running 해결 방법

    Date2017.09.04 Category운영관리 By정훈 Views2229
    Read More
  15. CUBRID 8.2.2 ~ 8.4.x 버전에서 'ALTER SERIAL ... CACHE <cached_num> / NOCACHE' ERROR 해결 방법

    Date2017.03.08 Category운영관리 By주영진 Views2161
    Read More
  16. JAVA_SP를 이용해서 정규표현식을 이용해서 치환을 하자.

    Date2017.10.10 Category질의작성 By성진 Views1325
    Read More
  17. 입력된 날자를 이용하여 해당 주차의 모든 날자 구하기

    Date2018.04.10 Category질의작성 By성진 Views1108
    Read More
  18. VALUES 절 활용하기

    Date2020.05.13 Category질의작성 By황영진 Views814
    Read More
  19. synonym에 대하여

    Date2023.09.07 Category질의작성 By김민종 Views257
    Read More
Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 Next
/ 14

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales