lnmp֮PDO_mysql.so

php��mysql�ǰ�װ�ڲ�ͬ�Ļ����ϡ���centos7.0��

����phpʱ

./configure \

--with-mysql=mysqlnd  \

--with-mysqli=mysqlnd\

--with-pdo-mysql=mysqlnd

���mysql��PDO����û�м�����ȥ��


����취��

1������Դ���:php-5.5.32/ext/pdo_mysql

    /usr/local/services/php/bin/phpize  #������ʾ����Ӧ��

    ./configure --with-php-config=/usr/local/services/php/bin/php-config

    make && make install    

    ��ʱ�ͻ��ڸ�Ŀ¼�µ�modules�����pdo_mysql.so

2��copy�ļ�

    cp modules/pdo_mysql.so  /usr/local/services/php-5.5.32/lib/php/extensions/no-debug-non-zts-20121212/


3�����뵽php.ini�ļ�

    extension_dir = "/usr/local/services/php-5.5.32/lib/php/extensions/no-debug-non-zts-20121212/"

    extension="pdo_mysql.so"


4������php-fpm��������





==============================================

����libiconvʱ�������´���

./stdio.h:1010:1: error: ��gets�� undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
make[2]: *** [progname.o] Error 1
make[2]: Leaving directory `/root/libiconv-1.14_2/srclib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/libiconv-1.14_2/srclib'
make: *** [all] Error 2

���������

cd libiconv-1.14/srclib

vim stdio.in.h

ͨ����������λ��_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");��һ�У�Ȼ������һ�е�ǰ������������뼴�ɣ��޸ĺ���������£�

#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
        _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif

Ȼ����make && make install


============================================

php���뱨��

/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup'
/usr/bin/ld: note: 'ber_strdup' is defined in DSO /lib64/liblber-2.4.so.2 so try adding it to the linker command line
/lib64/liblber-2.4.so.2: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


����취��

./configure��

�༭MakeFile

�ҵ� ��ͷ�� 'EXTRA_LIBS' ��һ�� �ڽ�β���� '-llber' Ȼ��ִ�� make && make install


你可能感兴趣的:(lnmp֮PDO_mysql.so)