ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • yum으로 php5.3 설치하기 (atomic repo 추가)
    PHP 2013. 1. 29. 20:27

    webpagetest는 php5.3 이상에서 동작한다네


    http://pat.im/924


    위에거 따라하고 아래와 같은  경고나 에러가 날 수 있음..


    [root@localhost ext]# php -v

    PHP Warning:  Module 'mailparse' already loaded in Unknown on line 0

    PHP 5.3.21 (cli) (built: Jan 20 2013 11:31:40)

    Copyright (c) 1997-2013 The PHP Group

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



    그럼 아래 내용대로 해결하시길


    http://www.atomicorp.com/forum/viewtopic.php?t=1836 


    Just managed to compile and install the mailparse extension under Redhat ES5 which doesn't provide an rpm. 

    The pecl install command wont run on a normal Redhat ES install for a load of reasons. main ones being /tmp doesn't allow execution of script (but you could use mount -o remount,exec /tmp) ; the mbstring module detect can be overridden with the pecl -n switch but you will still need access to the mbstring header files. 

    A workable solution is- 

    Code:
    wget "http://pecl.php.net/get/mailparse-2.1.4.tgz"
    tar xfvz mailparse-2.1.4.tgz
    cd mailparse-2.1.4
    phpize
    ./configure


    but before 'make' you will need the mbstring headers. get from the same version as your version of PHP, (I got them from redhat's srpm)
    extract the tar.gz.

    Code:
    cd php-5.1.6/ext/
    cp -a mbstring ~/mailparse-2.1.4/ext/


    then in mailparse-2.1.4

    Code:
    make

    [si@havana modules]$ file mailparse.so
    mailparse.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
    [si@havana modules]$  


    install it......

    Code:
    [si@havana modules]$ sudo su
    [root@havana modules]# cp mailparse.so /usr/lib64/php/modules/
    [root@havana modules]# echo "extension=mailparse.so" > /etc/php.d/mmailparse.ini


    note that I've called the ini file 'mmailparse.ini' as the php.d ini files are loaded in alphabetical order. Mailparse needs mbstring so it needs to be loaded first. 

    or else you will get a warning like ...... 

    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mailparse.so' - /usr/lib64/php/modules/mailparse.so: undefined symbol: mbfl_name2no_encoding in Unknown on line 0 


    reload apache and check the output of phpinfo() to check it has loaded.

Designed by Tistory.