php79 / stack

PHP 5.3 ~ 8.4 + Nginx + Let's Encrypt + MariaDB + 앱 자동 설치
https://www.php79.com
MIT License
90 stars 32 forks source link

문의 드립니다. MSSQL #33

Closed anmkst closed 7 years ago

anmkst commented 7 years ago

안녕하세요 좋은 사이트를 만나서 설치하면서 많이 공부하고 있습니다. 문의드릴게 있는데요. php53으로 설치하였고, MSSQL 연결을 하려고 하는데 freetds 설치까지는 했는데 막상 php.ini 에 적용하려고 하니 너무 막막하네요. 어떻게 해야 할까요...? 질문이 너무 초보스러워서 죄송합니다.

ibin79 commented 7 years ago

php.ini 경로는 status.sh 명령으로 확인 가능하십니다.

# /root/stack/status.sh 

- php.ini
...
/usr/local/php53/etc/php.d/z-php79.ini

mssql 확장 모듈 설치 방법을 문의하신 것이라면... 대략 다음 순서로 진행하면 됩니다. (모듈 연동까진 확인했으나, 시간 관계상 실제 mssql 디비와의 연결 테스트는 하지 못 했습니다.)

CentOS 7 + PHP 5.3 (compile) 환경에서 mssql 확장 모듈 설치

freetds 먼저 설치

cd /usr/local/src/
wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-patched.tar.gz
tar zxvfp freetds-patched.tar.gz
cd freetds-1.00.55/
./configure --prefix=/usr/local/freetds
make
make install

PHP 5.3 에 mssql 확장 모듈 설치

cd /usr/local/src/php-5.3.29
cd ext/mssql/
/usr/local/php53/bin/phpize
./configure --with-mssql=/usr/local/freetds/ --with-php-config=/usr/local/php53/bin/php-config
make
make install
echo 'extension=mssql.so' > /usr/local/php53/etc/php.d/mssql.ini

PHP 5.3 에서 확장 모듈 로딩 확인

# php53 -m|grep mssql
mssql

PHP 5.3 FPM 서비스 재시작

# service php53-php-fpm restart
Redirecting to /bin/systemctl restart  php53-php-fpm.service
anmkst commented 7 years ago

감사합니다. 바로 적용해보겠습니다. apm만 사용하다보니 php.ini 수정시 php-fpm이란걸 재시작 해야한다는걸 모르고 고생했네요

anmkst commented 7 years ago

죄송합니다. 설치중에 에러가 나서 몇가지 문의 좀 드릴게요.

  1. PHP 5.3 에 mssql 확장 모듈 설치

cd /usr/local/src/php-5.3.29 cd ext/mssql/ ./configure 위 부분에서 /usr/local/src/php-5.3.29/ext/mssql/ 에는 configure 라는 파일이 없는데 /usr/local/src/php-5.3.29 여기서 실행하는게 맞는지요?

  1. /usr/local/src/php-5.3.29/configure 실행시 make 부분에서 에러가 납니다... `[root@localhost php-5.3.29]# cd /usr/local/src/php-5.3.29 [root@localhost php-5.3.29]# ./configure --with-mssql=/usr/local/freetds/ --with-php-config=/usr/local/php53/bin/php-config loading cache ./config.cache checking for Cygwin environment... (cached) no checking for mingw32 environment... (cached) no checking for egrep... (cached) grep -E checking for a sed that does not truncate output... (cached) /usr/bin/sed checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for gcc... (cached) gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking how to run the C preprocessor... (cached) gcc -E checking for icc... no checking for suncc... no checking whether gcc and cc understand -c and -o together... (cached) yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking whether ln -s works... (cached) yes checking for system library directory... lib checking whether to enable runpaths... yes checking if compiler supports -R... (cached) no checking if compiler supports -Wl,-rpath,... (cached) yes checking for gawk... (cached) gawk checking for bison... (cached) bison -y checking for bison version... (cached) invalid configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.4 (found: none). checking for re2c... no configure: warning: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking whether to enable computed goto gcc extension with re2c... no checking whether to force non-PIC code in shared modules... no checking whether /dev/urandom exists... yes checking for pthreads_cflags... (cached) -pthread checking for pthreads_lib... (cached)

Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking whether to enable Apache charset compatibility option... no checking for Apache 2.0 filter-module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... no checking for Apache 1.x (hooks) module support via DSO through APXS... no checking for Apache 1.x (hooks) module support... no checking whether to enable Apache charset compatibility option... no checking for Caudium support... no checking for CLI build... yes checking for Continuity support... no checking for embedded SAPI library support... no checking for FPM build... no checking for Zeus ISAPI support... no checking for LiteSpeed support... no checking for Milter support... no checking for NSAPI support... no checking for PHTTPD support... no checking for Pi3Web support... no checking whether Roxen module is build using ZTS... no checking for Roxen/Pike support... checking for thttpd... no checking for TUX... no checking for webjames... no checking whether to build CGI binary... yes checking for socklen_t in sys/socket.h... yes checking for sun_len in sys/un.h... no checking whether cross-process locking is required by accept()... no checking for chosen SAPI module... cgi

Running system checks checking for sendmail... no checking whether system uses EBCDIC... (cached) no checking whether byte ordering is bigendian... (cached) no checking whether writing to stdout works... (cached) yes checking for socket... yes checking for socketpair... yes checking for htonl... yes checking for gethostname... yes checking for gethostbyaddr... yes checking for yp_get_default_domain... no checking for yp_get_default_domain... no checking for yp_get_default_domain in -lnsl... yes checking for dlopen... no checking for dlopen... no checking for dlopen in -ldl... yes checking for sin in -lm... (cached) yes checking for inet_aton... yes checking for ANSI C header files... (cached) yes checking for dirent.h that defines DIR... (cached) yes checking for opendir in -ldir... (cached) no checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for dirent.h... (cached) yes checking for ApplicationServices/ApplicationServices.h... (cached) no checking for sys/param.h... (cached) yes checking for sys/types.h... (cached) yes checking for sys/time.h... (cached) yes checking for netinet/in.h... (cached) yes checking for alloca.h... (cached) yes checking for arpa/inet.h... (cached) yes checking for arpa/nameser.h... (cached) yes checking for assert.h... (cached) yes checking for crypt.h... (cached) yes checking for dns.h... (cached) no checking for fcntl.h... (cached) yes checking for grp.h... (cached) yes checking for ieeefp.h... (cached) no checking for langinfo.h... (cached) yes checking for limits.h... (cached) yes checking for locale.h... (cached) yes checking for monetary.h... (cached) yes checking for netdb.h... (cached) yes checking for pwd.h... (cached) yes checking for resolv.h... (cached) yes checking for signal.h... (cached) yes checking for stdarg.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for syslog.h... (cached) yes checking for sysexits.h... (cached) yes checking for sys/ioctl.h... (cached) yes checking for sys/file.h... (cached) yes checking for sys/mman.h... (cached) yes checking for sys/mount.h... (cached) yes checking for sys/poll.h... (cached) yes checking for sys/resource.h... (cached) yes checking for sys/select.h... (cached) yes checking for sys/socket.h... (cached) yes checking for sys/stat.h... (cached) yes checking for sys/statfs.h... (cached) yes checking for sys/statvfs.h... (cached) yes checking for sys/vfs.h... (cached) yes checking for sys/sysexits.h... (cached) no checking for sys/varargs.h... (cached) no checking for sys/wait.h... (cached) yes checking for sys/loadavg.h... (cached) no checking for termios.h... (cached) yes checking for unistd.h... (cached) yes checking for unix.h... (cached) no checking for utime.h... (cached) yes checking for sys/utsname.h... (cached) yes checking for sys/ipc.h... (cached) yes checking for dlfcn.h... (cached) yes checking for assert.h... (cached) yes checking for fopencookie... (cached) yes checking for broken getcwd... no checking for broken libc stdio... (cached) yes checking whether struct tm is in sys/time.h or time.h... (cached) time.h checking for tm_zone in struct tm... (cached) yes checking for missing declarations of reentrant functions... done checking for fclose declaration... ok checking for tm_gmtoff in struct tm... (cached) yes checking for struct flock... (cached) yes checking for socklen_t... (cached) yes checking size of size_t... (cached) 8 checking size of long long... (cached) 8 checking size of long long int... (cached) 8 checking size of long... (cached) 8 checking size of int... (cached) 4 checking size of intmax_t... (cached) 8 checking size of ssize_t... (cached) 8 checking size of ptrdiff_t... (cached) 8 checking for st_blksize in struct stat... (cached) yes checking for st_blocks in struct stat... (cached) yes checking for st_rdev in struct stat... (cached) yes checking for size_t... (cached) yes checking for uid_t in sys/types.h... (cached) yes checking for struct sockaddr_storage... (cached) yes checking for field sa_len in struct sockaddr... (cached) no checking for IPv6 support... (cached) yes checking for vprintf... (cached) yes checking for alphasort... (cached) yes checking for asctime_r... (cached) yes checking for chroot... (cached) yes checking for ctime_r... (cached) yes checking for cuserid... (cached) yes checking for crypt... (cached) no checking for flock... (cached) yes checking for ftok... (cached) yes checking for funopen... (cached) no checking for gai_strerror... (cached) yes checking for gcvt... (cached) yes checking for getloadavg... (cached) yes checking for getlogin... (cached) yes checking for getprotobyname... (cached) yes checking for getprotobynumber... (cached) yes checking for getservbyname... (cached) yes checking for getservbyport... (cached) yes checking for gethostname... (cached) yes checking for getrusage... (cached) yes checking for gettimeofday... (cached) yes checking for gmtime_r... (cached) yes checking for getpwnam_r... (cached) yes checking for getgrnam_r... (cached) yes checking for getpwuid_r... (cached) yes checking for grantpt... (cached) yes checking for inet_ntoa... (cached) yes checking for inet_ntop... (cached) yes checking for inet_pton... (cached) yes checking for isascii... (cached) yes checking for link... (cached) yes checking for localtime_r... (cached) yes checking for lockf... (cached) yes checking for lchown... (cached) yes checking for lrand48... (cached) yes checking for memcpy... (cached) yes checking for memmove... (cached) yes checking for mkstemp... (cached) yes checking for mmap... (cached) yes checking for nl_langinfo... (cached) yes checking for perror... (cached) yes checking for poll... (cached) yes checking for ptsname... (cached) yes checking for putenv... (cached) yes checking for realpath... (cached) yes checking for random... (cached) yes checking for rand_r... (cached) yes checking for scandir... (cached) yes checking for setitimer... (cached) yes checking for setlocale... (cached) yes checking for localeconv... (cached) yes checking for setenv... (cached) yes checking for setpgid... (cached) yes checking for setsockopt... (cached) yes checking for setvbuf... (cached) yes checking for shutdown... (cached) yes checking for sin... (cached) yes checking for snprintf... (cached) yes checking for srand48... (cached) yes checking for srandom... (cached) yes checking for statfs... (cached) yes checking for statvfs... (cached) yes checking for std_syslog... (cached) no checking for strcasecmp... (cached) yes checking for strcoll... (cached) yes checking for strdup... (cached) yes checking for strerror... (cached) yes checking for strftime... (cached) yes checking for strnlen... (cached) yes checking for strptime... (cached) yes checking for strstr... (cached) yes checking for strtok_r... (cached) yes checking for symlink... (cached) yes checking for tempnam... (cached) yes checking for tzset... (cached) yes checking for unlockpt... (cached) yes checking for unsetenv... (cached) yes checking for usleep... (cached) yes checking for utime... (cached) yes checking for vsnprintf... (cached) yes checking for vasprintf... (cached) yes checking for asprintf... (cached) yes checking for nanosleep... (cached) yes checking for nanosleep in -lrt... yes checking for getaddrinfo... (cached) yes checking for __sync_fetch_and_add... (cached) yes checking for strlcat... (cached) no checking for strlcpy... (cached) no checking for getopt... (cached) yes checking whether utime accepts a null argument... (cached) yes checking for working alloca.h... (cached) yes checking for alloca... (cached) yes checking for declared timezone... (cached) yes checking for type of reentrant time-related functions... (cached) POSIX checking for readdir_r... (cached) yes checking for type of readdir_r... (cached) POSIX checking for in_addr_t... (cached) yes checking for crypt_r... (cached) no

General settings checking whether to include gcov symbols... no checking whether to include debugging symbols... no checking layout of installed files... PHP checking path to configuration file... DEFAULT checking where to scan for configuration files... checking whether to enable safe mode by default... no checking for safe mode exec dir... /usr/local/php/bin checking whether to enable PHP's own SIGCHLD handler... no checking whether to enable magic quotes by default... no checking whether to explicitly link against libgcc... no checking whether to enable short tags by default... yes checking whether to enable dmalloc... no checking whether to enable IPv6 support... yes checking how big to make fd sets... using system default

Configuring extensions checking size of long... (cached) 8 checking size of int... (cached) 4 checking for int32_t... (cached) yes checking for uint32_t... (cached) yes checking for sys/types.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking for strtoll... (cached) yes checking for atoll... (cached) yes checking for strftime... (cached) yes checking which regex library to use... php checking whether to enable LIBXML support... yes checking libxml2 install dir... no checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking for OpenSSL support... no checking for Kerberos support... no checking for PCRE library to use... bundled checking whether to enable the SQLite3 extension... yes checking bundled sqlite3 library... yes checking for ZLIB support... no checking if the location of ZLIB install directory is defined... no checking whether to enable bc style precision math functions... no checking for BZip2 support... no checking whether to enable calendar conversion support... no checking whether to enable ctype functions... yes checking for cURL support... no checking if we should use cURL for url streams... no checking for QDBM support... no checking for GDBM support... no checking for NDBM support... no checking for Berkeley DB4 support... no checking for Berkeley DB3 support... no checking for Berkeley DB2 support... no checking for DB1 support... no checking for DBM support... no checking for CDB support... no checking for INI File support... no checking for FlatFile support... no checking whether to enable DBA interface... no checking whether to enable DOM support... yes checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking for ENCHANT support... no checking whether to enable EXIF (metadata from images) support... no checking for fileinfo support... yes checking for utimes... (cached) yes checking for strndup... (cached) yes checking whether to enable input filter support... yes checking pcre install prefix... no checking whether to enable FTP support... no checking OpenSSL dir for FTP... no checking for GD support... no checking for the location of libjpeg... no checking for the location of libpng... no checking for the location of libXpm... no checking for FreeType 2... no checking for T1lib support... no checking whether to enable truetype string function in GD... no checking whether to enable JIS-mapped Japanese font support in GD... no checking for GNU gettext support... no checking for GNU MP support... no checking for mhash support... no checking whether to enable hash support... yes checking whether byte ordering is bigendian... (cached) no checking size of short... (cached) 2 checking size of int... (cached) 4 checking size of long... (cached) 8 checking size of long long... (cached) 8 checking for iconv support... yes checking for iconv... (cached) yes checking if iconv is glibc's... yes checking if iconv supports errno... yes checking if your cpp allows macro usage in include lines... yes checking for IMAP support... no checking for IMAP Kerberos support... no checking for IMAP SSL support... no checking for InterBase support... no checking whether to enable internationalization support... no checking whether to enable JavaScript Object Serialization support... yes checking for ANSI C header files... (cached) yes checking for LDAP support... no checking for LDAP Cyrus SASL support... no checking whether to enable multibyte string support... no checking whether to enable multibyte regex support... yes checking whether to check multibyte regex backtrack... yes checking for external libmbfl... no checking for external oniguruma... no checking for mcrypt support... no checking for MSSQL support via FreeTDS... yes checking for dnet_addr in -ldnet_stub... (cached) no checking for MySQL support... no checking for specified location of the MySQL UNIX socket... no checking for MySQLi support... no checking whether to enable embedded MySQLi support... no checking for Oracle Database OCI8 support... no checking whether to enable pcntl support... no checking whether to enable PDO support... yes checking for PDO_DBLIB support via FreeTDS... no checking for Firebird support for PDO... no checking for MySQL support for PDO... no checking Oracle OCI support for PDO... no checking for ODBC v3 support for PDO... no checking for PostgreSQL support for PDO... no checking for sqlite 3 support for PDO... yes checking for PDO includes... checking for PDO includes... /usr/local/src/php-5.3.29/ext checking for usleep... (cached) yes checking for nanosleep... (cached) yes checking for time.h... (cached) yes checking for fdatasync in -lrt... (cached) yes checking for PostgreSQL support... no checking for phar archive support... yes checking for phar openssl support... no checking whether to enable POSIX-like functions... yes checking for sys/mkdev.h... (cached) no checking for seteuid... (cached) yes checking for setegid... (cached) yes checking for setsid... (cached) yes checking for getsid... (cached) yes checking for setpgid... (cached) yes checking for getpgid... (cached) yes checking for ctermid... (cached) yes checking for mkfifo... (cached) yes checking for mknod... (cached) yes checking for getrlimit... (cached) yes checking for getlogin... (cached) yes checking for getgroups... (cached) yes checking for makedev... (cached) no checking for initgroups... (cached) yes checking for getpwuid_r... (cached) yes checking for getgrgid_r... (cached) yes checking for working ttyname_r() implementation... yes checking for utsname.domainname... (cached) yes checking for PSPELL support... no checking for libedit readline replacement... no checking for readline support... no checking for recode support... no checking whether to enable PHP sessions... yes checking for mm support... no checking whether pwrite works... (cached) yes checking whether pread works... (cached) yes checking whether to enable shmop support... no checking whether to enable SimpleXML support... yes checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking for SNMP support... no checking OpenSSL dir for SNMP... no checking whether to enable UCD SNMP hack... no checking whether to enable SOAP support... no checking whether to enable sockets support... no checking whether zend_object_value is packed... no checking for sqlite support... yes checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)... no checking for PDO includes... (cached) /usr/local/src/php-5.3.29/ext checking for lemon... no configure: warning: lemon versions supported for regeneration of libsqlite parsers: 1.0 (found: none). checking size of char *... (cached) 8 checking for usleep... (cached) yes checking for nanosleep... (cached) yes checking for time.h... (cached) yes checking whether flush should be called explicitly after a buffered io... (cached) no checking for crypt in -lcrypt... (cached) yes checking for standard DES crypt... (cached) yes checking for extended DES crypt... (cached) no checking for MD5 crypt... (cached) yes checking for Blowfish crypt... (cached) no checking for SHA512 crypt... (cached) no checking for SHA256 crypt... (cached) no checking whether the compiler supports alignof... (cached) yes checking whether the compiler supports aligned attribute... (cached) yes checking for getcwd... (cached) yes checking for getwd... (cached) yes checking for asinh... (cached) yes checking for acosh... (cached) yes checking for atanh... (cached) yes checking for log1p... (cached) yes checking for hypot... (cached) yes checking for glob... (cached) yes checking for strfmon... (cached) yes checking for nice... (cached) yes checking for fpclass... (cached) no checking for isinf... (cached) yes checking for isnan... (cached) yes checking for mempcpy... (cached) yes checking for strpncpy... (cached) no checking for working fnmatch... (cached) yes checking for fork... (cached) yes checking if your OS can spawn processes with inherited handles... yes checking for res_nsearch... no checking for res_nsearch... no checking for res_nsearch in -lresolv... no checking for res_nsearch in -lresolv... yes checking for dns_search... no checking for dns_search... no checking for dns_search in -lresolv... no checking for dns_search in -lresolv... no checking for dns_search in -lbind... no checking for dns_search in -lbind... no checking for dns_search in -lsocket... no checking for dns_search in -lsocket... no checking for dn_expand... no checking for dn_expand... yes checking for dn_skipname... no checking for dn_skipname... yes checking for res_search... no checking for __res_search... yes checking whether atof() accepts NAN... (cached) yes checking whether atof() accepts INF... (cached) yes checking whether HUGE_VAL == INF... (cached) yes checking whether HUGE_VAL + -HUGEVAL == NAN... (cached) yes checking whether strptime() declaration fails... (cached) no checking for wchar.h... (cached) yes checking for mblen... (cached) yes checking for mbrlen... (cached) yes checking for mbsinit... (cached) yes checking for mbstate_t... (cached) yes checking for atomic.h... (cached) no checking for Sybase-CT support... no checking whether to enable System V IPC support... no checking whether to enable System V semaphore support... no checking whether to enable System V shared memory support... no checking for TIDY support... no checking whether to enable tokenizer support... yes checking whether to enable WDDX support... no checking libexpat dir for WDDX... no checking whether to enable XML support... yes checking libexpat install dir... no checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking whether to enable XMLReader support... yes checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking for XMLRPC-EPI support... no checking libexpat dir for XMLRPC-EPI... no checking iconv dir for XMLRPC-EPI... no checking whether to enable XMLWriter support... yes checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking for XSL support... no checking for zip archive read/writesupport... no checking pcre install prefix... no checking whether to enable mysqlnd... no checking whether to disable compressed protocol support in mysqlnd... yes

Configuring PEAR checking whether to install PEAR... yes

Configuring Zend checking for bison version... (cached) invalid configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.4 (found: none). checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for limits.h... (cached) yes checking for malloc.h... (cached) yes checking for string.h... (cached) yes checking for unistd.h... (cached) yes checking for stdarg.h... (cached) yes checking for sys/types.h... (cached) yes checking for sys/time.h... (cached) yes checking for signal.h... (cached) yes checking for unix.h... (cached) no checking for stdlib.h... (cached) yes checking for dlfcn.h... (cached) yes checking for size_t... (cached) yes checking return type of signal handlers... (cached) void checking for uint... (cached) yes checking for ulong... (cached) yes checking for int32_t... yes checking for uint32_t... yes checking for vprintf... (cached) yes checking for 8-bit clean memcmp... (cached) yes checking for working alloca.h... (cached) yes checking for alloca... (cached) yes checking for memcpy... (cached) yes checking for strdup... (cached) yes checking for getpid... (cached) yes checking for kill... (cached) yes checking for strtod... (cached) yes checking for strtol... (cached) yes checking for finite... (cached) yes checking for fpclass... (cached) no checking for sigsetjmp... (cached) no checking whether sprintf is broken... (cached) no checking for finite... (cached) yes checking for isfinite... (cached) no checking for isinf... (cached) yes checking for isnan... (cached) yes checking whether fp_except is defined... (cached) no checking for usable _FPU_SETCW... yes checking for usable fpsetprec... no checking for usable _controlfp... no checking for usable _controlfp_s... no checking whether FPU control word can be manipulated by inline assembler... yes checking whether double cast to long preserves least significant bits... no checking for dlfcn.h... (cached) yes checking whether dlsym() requires a leading underscore in symbol names... no checking virtual machine dispatch method... CALL checking whether to enable thread-safety... no checking whether to enable inline optimization for GCC... yes checking whether to enable Zend debugging... no checking whether to enable Zend multibyte... no checking for inline... (cached) inline checking target system is Darwin... no checking for MM alignment and log values... done checking for memory allocation using mmap(MAP_ANON)... yes checking for memory allocation using mmap(/dev/zero)... yes checking for mremap... (cached) yes

Configuring TSRM checking for stdarg.h... (cached) yes

Configuring libtool checking build system type... x86_64-unknown-linux-gnu checking for ld used by gcc... (cached) /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes checking for /usr/bin/ld option to reload object files... (cached) -r checking for BSD-compatible nm... (cached) /usr/bin/nm -B checking how to recognize dependent libraries... (cached) pass_all checking for object suffix... (cached) o checking for executable suffix... (cached) no checking the maximum length of command line arguments... (cached) 1572864 checking command to parse /usr/bin/nm -B output from gcc object... (cached) ok checking for objdir... (cached) .libs checking for ar... (cached) ar checking for ranlib... (cached) ranlib checking for strip... (cached) strip checking if gcc supports -fno-rtti -fno-exceptions... (cached) no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... (cached) yes checking if gcc static flag -static works... (cached) no checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so (cached) (cached) checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes

creating libtool appending configuration tag "CXX" to libtool

Generating files creating ./config.status creating php5.spec creating main/build-defs.h creating scripts/phpize creating scripts/man1/phpize.1 creating scripts/php-config creating scripts/man1/php-config.1 creating sapi/cli/php.1 creating main/php_config.h main/php_config.h is unchanged creating main/internal_functions.c creating main/internal_functions_cli.c +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+

Thank you for using PHP.

Notice: Following unknown configure options were used:

--with-php-config=/usr/local/php53/bin/php-config

Check './configure --help' for available options

[root@localhost php-5.3.29]# make /bin/sh /usr/local/src/php-5.3.29/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/standard/ -I/usr/local/src/php-5.3.29/ext/standard/ -DPHP_ATOM_INC -I/usr/local/src/php-5.3.29/include -I/usr/local/src/php-5.3.29/main -I/usr/local/src/php-5.3.29 -I/usr/local/src/php-5.3.29/ext/date/lib -I/usr/local/src/php-5.3.29/ext/ereg/regex -I/usr/include/libxml2 -I/usr/local/freetds//include -I/usr/local/src/php-5.3.29/ext/sqlite3/libsqlite -I/usr/local/src/php-5.3.29/TSRM -I/usr/local/src/php-5.3.29/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /usr/local/src/php-5.3.29/ext/standard/info.c -o ext/standard/info.lo /bin/sh /usr/local/src/php-5.3.29/libtool --silent --preserve-dup-deps --mode=compile gcc -Imain/ -I/usr/local/src/php-5.3.29/main/ -DPHP_ATOM_INC -I/usr/local/src/php-5.3.29/include -I/usr/local/src/php-5.3.29/main -I/usr/local/src/php-5.3.29 -I/usr/local/src/php-5.3.29/ext/date/lib -I/usr/local/src/php-5.3.29/ext/ereg/regex -I/usr/include/libxml2 -I/usr/local/freetds//include -I/usr/local/src/php-5.3.29/ext/sqlite3/libsqlite -I/usr/local/src/php-5.3.29/TSRM -I/usr/local/src/php-5.3.29/Zend -I/usr/include -g -O2 -fvisibility=hidden -c main/internal_functions.c -o main/internal_functions.lo /bin/sh /usr/local/src/php-5.3.29/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -I/usr/include -g -O2 -fvisibility=hidden -L/usr/local/freetds//lib -R /usr/local/freetds//lib ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo ext/date/lib/unixtime2tm.lo ext/date/lib/parse_iso_intervals.lo ext/date/lib/interval.lo ext/ereg/ereg.lo ext/ereg/regex/regcomp.lo ext/ereg/regex/regexec.lo ext/ereg/regex/regerror.lo ext/ereg/regex/regfree.lo ext/libxml/libxml.lo ext/pcre/pcrelib/pcre_chartables.lo ext/pcre/pcrelib/pcre_ucd.lo ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo ext/pcre/pcrelib/pcre_exec.lo ext/pcre/pcrelib/pcre_fullinfo.lo ext/pcre/pcrelib/pcre_get.lo ext/pcre/pcrelib/pcre_globals.lo ext/pcre/pcrelib/pcre_maketables.lo ext/pcre/pcrelib/pcre_newline.lo ext/pcre/pcrelib/pcre_ord2utf8.lo ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/sqlite3/sqlite3.lo ext/sqlite3/libsqlite/sqlite3.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/fileinfo/fileinfo.lo ext/fileinfo/libmagic/apprentice.lo ext/fileinfo/libmagic/apptype.lo ext/fileinfo/libmagic/ascmagic.lo ext/fileinfo/libmagic/cdf.lo ext/fileinfo/libmagic/cdf_time.lo ext/fileinfo/libmagic/compress.lo ext/fileinfo/libmagic/encoding.lo ext/fileinfo/libmagic/fsmagic.lo ext/fileinfo/libmagic/funcs.lo ext/fileinfo/libmagic/is_tar.lo ext/fileinfo/libmagic/magic.lo ext/fileinfo/libmagic/print.lo ext/fileinfo/libmagic/readcdf.lo ext/fileinfo/libmagic/readelf.lo ext/fileinfo/libmagic/softmagic.lo ext/filter/filter.lo ext/filter/sanitizing_filters.lo ext/filter/logical_filters.lo ext/filter/callback_filter.lo ext/hash/hash.lo ext/hash/hash_md.lo ext/hash/hash_sha.lo ext/hash/hash_ripemd.lo ext/hash/hash_haval.lo ext/hash/hash_tiger.lo ext/hash/hash_gost.lo ext/hash/hash_snefru.lo ext/hash/hash_whirlpool.lo ext/hash/hash_adler32.lo ext/hash/hash_crc32.lo ext/hash/hash_salsa.lo ext/iconv/iconv.lo ext/json/json.lo ext/json/utf8_to_utf16.lo ext/json/utf8_decode.lo ext/json/JSON_parser.lo ext/mssql/php_mssql.lo ext/pdo/pdo.lo ext/pdo/pdo_dbh.lo ext/pdo/pdo_stmt.lo ext/pdo/pdo_sql_parser.lo ext/pdo/pdo_sqlstate.lo ext/pdo_sqlite/pdo_sqlite.lo ext/pdo_sqlite/sqlite_driver.lo ext/pdo_sqlite/sqlite_statement.lo ext/phar/util.lo ext/phar/tar.lo ext/phar/zip.lo ext/phar/stream.lo ext/phar/func_interceptors.lo ext/phar/dirstream.lo ext/phar/phar.lo ext/phar/phar_object.lo ext/phar/phar_path_check.lo ext/posix/posix.lo ext/reflection/php_reflection.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/simplexml/sxe.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_exceptions.lo ext/spl/spl_observer.lo ext/spl/spl_dllist.lo ext/spl/spl_heap.lo ext/spl/spl_fixedarray.lo ext/sqlite/sqlite.lo ext/sqlite/sess_sqlite.lo ext/sqlite/pdo_sqlite2.lo ext/sqlite/libsqlite/src/opcodes.lo ext/sqlite/libsqlite/src/parse.lo ext/sqlite/libsqlite/src/encode.lo ext/sqlite/libsqlite/src/auth.lo ext/sqlite/libsqlite/src/btree.lo ext/sqlite/libsqlite/src/build.lo ext/sqlite/libsqlite/src/delete.lo ext/sqlite/libsqlite/src/expr.lo ext/sqlite/libsqlite/src/func.lo ext/sqlite/libsqlite/src/hash.lo ext/sqlite/libsqlite/src/insert.lo ext/sqlite/libsqlite/src/main.lo ext/sqlite/libsqlite/src/os.lo ext/sqlite/libsqlite/src/pager.lo ext/sqlite/libsqlite/src/printf.lo ext/sqlite/libsqlite/src/random.lo ext/sqlite/libsqlite/src/select.lo ext/sqlite/libsqlite/src/table.lo ext/sqlite/libsqlite/src/tokenize.lo ext/sqlite/libsqlite/src/update.lo ext/sqlite/libsqlite/src/util.lo ext/sqlite/libsqlite/src/vdbe.lo ext/sqlite/libsqlite/src/attach.lo ext/sqlite/libsqlite/src/btree_rb.lo ext/sqlite/libsqlite/src/pragma.lo ext/sqlite/libsqlite/src/vacuum.lo ext/sqlite/libsqlite/src/copy.lo ext/sqlite/libsqlite/src/vdbeaux.lo ext/sqlite/libsqlite/src/date.lo ext/sqlite/libsqlite/src/where.lo ext/sqlite/libsqlite/src/trigger.lo ext/standard/crypt_freesec.lo ext/standard/crypt_blowfish.lo ext/standard/crypt_sha512.lo ext/standard/crypt_sha256.lo ext/standard/php_crypt_r.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/sha1.lo ext/standard/user_filters.lo ext/standard/uuencode.lo ext/standard/filters.lo ext/standard/proc_open.lo ext/standard/streamsfuncs.lo ext/standard/http.lo ext/tokenizer/tokenizer.lo ext/tokenizer/tokenizer_data.lo ext/xml/xml.lo ext/xml/compat.lo ext/xmlreader/php_xmlreader.lo ext/xmlwriter/php_xmlwriter.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/getopt.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo main/streams/glob_wrapper.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_float.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo main/internal_functions.lo -lcrypt -lresolv -lcrypt -lrt -lsybdb -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lcrypt -o sapi/cgi/php-cgi ext/standard/html.o: In function determine_charset': /usr/local/src/php-5.3.29/ext/standard/html.c:732: undefined reference tombstring_globals' main/rfc1867.o: In function substring_conf': /usr/local/src/php-5.3.29/main/rfc1867.c:583: undefined reference tophp_mb_encoding_translation' /usr/local/src/php-5.3.29/main/rfc1867.c:584: undefined reference to php_mb_gpc_mbchar_bytes' main/rfc1867.o: In functionphp_ap_getword_conf': /usr/local/src/php-5.3.29/main/rfc1867.c:607: undefined reference to php_mb_encoding_translation' /usr/local/src/php-5.3.29/main/rfc1867.c:609: undefined reference tophp_mb_gpc_encoding_detector' main/rfc1867.o: In function php_mb_flush_gpc_variables': /usr/local/src/php-5.3.29/main/rfc1867.c:62: undefined reference tophp_mb_encoding_translation' /usr/local/src/php-5.3.29/main/rfc1867.c:64: undefined reference to php_mb_gpc_encoding_detector' /usr/local/src/php-5.3.29/main/rfc1867.c:65: undefined reference tophp_mb_gpc_encoding_converter' main/rfc1867.o: In function rfc1867_post_handler': /usr/local/src/php-5.3.29/main/rfc1867.c:846: undefined reference tophp_mb_encoding_translation' /usr/local/src/php-5.3.29/main/rfc1867.c:1194: undefined reference to php_mb_encoding_translation' /usr/local/src/php-5.3.29/main/rfc1867.c:1201: undefined reference tophp_mb_gpc_encoding_detector' /usr/local/src/php-5.3.29/main/rfc1867.c:1205: undefined reference to php_mb_strrchr' /usr/local/src/php-5.3.29/main/rfc1867.c:1206: undefined reference tophp_mb_strrchr' /usr/local/src/php-5.3.29/main/rfc1867.c:941: undefined reference to php_mb_encoding_translation' /usr/local/src/php-5.3.29/main/rfc1867.c:1203: undefined reference tophp_mb_gpc_encoding_converter' main/output.o: In function php_ob_init_named': /usr/local/src/php-5.3.29/main/output.c:460: undefined reference tophp_ob_gzhandler_check' collect2: error: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] 오류 1 [root@localhost php-5.3.29]# ` 어디서 부터 잘못된건지 ...후... 죄송합니다. 부탁드릴게요 ㅠㅠ

ibin79 commented 7 years ago

ext/mssql 디렉토리에서 phpize 를 실행해야 configure 파일이 생성됩니다만... 제가 누락했었네요. ^^ 아래처럼 해보세요.

cd /usr/local/src/php-5.3.29
cd ext/mssql/
/usr/local/php53/bin/phpize
./configure --with-mssql=/usr/local/freetds/ --with-php-config=/usr/local/php53/bin/php-config
make
make install
echo 'extension=mssql.so' > /usr/local/php53/etc/php.d/mssql.ini
anmkst commented 7 years ago

감사합니다. 에러의 연속이네요 ㅠㅠ [root@localhost mssql]# /usr/local/php53/bin/phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 configure.in:3: warning: prefer named diversions configure.in:3: warning: prefer named diversions [root@localhost mssql]#

아 죄송합니다. configure.in:3: warning: prefer named diversions 이게 에러가 아닌가 보네요...

anmkst commented 7 years ago

빌더는 성공한거 같은데 mssql 은 안올라 오네요

Build complete. Don't forget to run 'make test'.

[root@localhost mssql]# make install Installing shared extensions: /usr/local/php53/lib/php/extensions/no-debug-non-zts-20090626/ [root@localhost mssql]# echo 'extension=mssql.so' > /usr/local/php53/etc/php.d/mssql.ini [root@localhost mssql]# php53 -m|grep mssql [root@localhost mssql]# service php53-php-fpm restart Redirecting to /bin/systemctl restart php53-php-fpm.service [root@localhost mssql]# /root/stack/status.sh

ibin79 commented 7 years ago

PHP 에러 로그는 확인해보셨나요?

# grep PHP /var/log/messages|tail

해결이 안되면, 기존 설치 시도에서 php.ini 에서 수정/추가된 부분이 있다면 되돌려보는 등... 전체 과정을 재점검해보셔야 할 것 같습니다.

anmkst commented 7 years ago

[root@localhost mssql]# php53 -m|grep mssql [root@localhost mssql]# grep PHP /var/log/messages|tail Sep 4 17:17:42 localhost systemd: Started The PHP FastCGI Process Manager. Sep 4 17:17:42 localhost systemd: Starting The PHP FastCGI Process Manager... Sep 4 17:17:42 localhost php-fpm: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'mssql.so' in Unknown on line 0 Sep 4 17:17:47 localhost php53: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'mssql.so' in Unknown on line 0 Sep 4 17:23:12 localhost systemd: Stopping The PHP FastCGI Process Manager... Sep 4 17:23:12 localhost systemd: Started The PHP FastCGI Process Manager. Sep 4 17:23:12 localhost systemd: Starting The PHP FastCGI Process Manager... Sep 4 17:23:12 localhost php-fpm: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'mssql.so' in Unknown on line 0 Sep 4 17:23:39 localhost php53: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'mssql.so' in Unknown on line 0 Sep 4 17:25:27 localhost php53: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'mssql.so' in Unknown on line 0

이렇게 나오네요... 거의 다 온거 같은데 막판에 힘드네요 ㅠㅠ

anmkst commented 7 years ago

해결했습니다.!!! 자답드립니다.

이부분에서 make clean 실행 후 PHP 5.3 에 mssql 확장 모듈 설치 을 다시 해보니 해결했습니다.

ibin79 님 감사합니다