Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:apache:migration:buildphp [2015/07/07 15:41]
Jackson Zhang
— (current)
Line 1: Line 1:
-===== Build matching PHP binary ===== 
  
-There is a pre-built PHP 4 binary coming with LSWS, however, you should build your own PHP binary using matching configuration options used by Apache mod_php. ​ 
- 
-Get a list of compile options (type 'php -i' and look for the line with '​Configure Command =>' as shown below:) 
-<​file>​ 
-root@test ~># php -i 
-phpinfo() 
-PHP Version => 5.3.10 
-... 
-... 
-Configure Command =>  '​./​configure' ​ '​--build=x86_64-redhat-linux-gnu'​ '​--host=x86_64-redhat-linux-gnu'​ \ 
-'​--target=x86_64-redhat-linux-gnu'​ '​--program-prefix='​ '​--prefix=/​usr'​ '​--exec-prefix=/​usr'​ '​--bindir=/​usr/​bin'​ \ 
-'​--sbindir=/​usr/​sbin'​ '​--sysconfdir=/​etc'​ '​--datadir=/​usr/​share'​ '​--includedir=/​usr/​include'​ '​--libdir=/​usr/​lib64'​ \ 
-'​--libexecdir=/​usr/​libexec'​ '​--localstatedir=/​var'​ '​--sharedstatedir=/​usr/​com'​ '​--mandir=/​usr/​share/​man'​ \ 
-'​--infodir=/​usr/​share/​info'​ '​--cache-file=../​config.cache'​ '​--with-libdir=lib64'​ '​--with-config-file-path=/​etc'​ \ 
-'​--with-config-file-scan-dir=/​etc/​php.d'​ '​--disable-debug'​ '​--with-pic'​ '​--disable-rpath'​ '​--without-pear'​ \ 
-'​--with-bz2'​ '​--with-exec-dir=/​usr/​bin'​ '​--with-freetype-dir=/​usr'​ '​--with-png-dir=/​usr'​ '​--with-xpm-dir=/​usr'​ \ 
-'​--enable-gd-native-ttf'​ '​--with-t1lib=/​usr'​ '​--without-gdbm'​ '​--with-gettext'​ '​--with-gmp'​ '​--with-iconv'​ \ 
-'​--with-jpeg-dir=/​usr'​ '​--with-openssl'​ '​--with-zlib'​ '​--with-layout=GNU'​ '​--enable-exif'​ '​--enable-ftp'​ \ 
-'​--enable-magic-quotes'​ '​--enable-sockets'​ '​--with-kerberos'​ '​--enable-ucd-snmp-hack'​ '​--enable-shmop'​ \ 
-'​--enable-calendar'​ '​--with-libxml-dir=/​usr'​ '​--enable-xml'​ '​--with-system-tzdata'​ '​--with-mhash'​ \ 
-'​--enable-force-cgi-redirect'​ '​--libdir=/​usr/​lib64/​php'​ '​--enable-pcntl'​ '​--with-imap=shared'​ '​--with-imap-ssl'​ \ 
-'​--enable-mbstring=shared'​ '​--enable-mbregex'​ '​--with-gd=shared'​ '​--enable-bcmath=shared'​ '​--enable-dba=shared'​ \ 
-'​--with-db4=/​usr'​ '​--with-xmlrpc=shared'​ '​--with-ldap=shared'​ '​--with-ldap-sasl'​ '​--enable-mysqlnd=shared'​ \ 
-'​--with-mysql=shared,​mysqlnd'​ '​--with-mysqli=shared,​mysqlnd'​ '​--with-mysql-sock=/​var/​lib/​mysql/​mysql.sock'​ \ 
-'​--with-oci8=shared,​instantclient,/​usr/​lib64/​oracle/​11.2/​client64/​lib,​11.2'​ \ 
-'​--with-pdo-oci=shared,​instantclient,/​usr,​11.2'​ '​--with-interbase=shared,/​usr/​lib64/​firebird'​ \ 
-'​--with-pdo-firebird=shared,/​usr/​lib64/​firebird'​ '​--enable-dom=shared'​ \ 
-'​--with-pgsql=shared'​ '​--enable-wddx=shared'​ '​--with-snmp=shared,/​usr'​ '​--enable-soap=shared'​ \ 
-'​--with-xsl=shared,/​usr'​ '​--enable-xmlreader=shared'​ '​--enable-xmlwriter=shared'​ '​--with-curl=shared,/​usr'​ \ 
-'​--enable-fastcgi'​ '​--enable-pdo=shared'​ '​--with-pdo-odbc=shared,​unixODBC,/​usr'​ '​--with-pdo-mysql=shared,​mysqlnd'​ \ 
-'​--with-pdo-pgsql=shared,/​usr'​ '​--with-pdo-sqlite=shared,/​usr'​ '​--with-pdo-dblib=shared,/​usr'​ '​--without-sqlite3'​ \ 
-'​--with-sqlite=shared,/​usr'​ '​--enable-json=shared'​ '​--enable-zip=shared'​ '​--without-readline'​ '​--with-libedit'​ \ 
-'​--with-pspell=shared'​ '​--enable-phar=shared'​ '​--with-mcrypt=shared,/​usr'​ '​--with-tidy=shared,/​usr'​ \ 
-'​--with-mssql=shared,/​usr'​ '​--enable-sysvmsg=shared'​ '​--enable-sysvshm=shared'​ '​--enable-sysvsem=shared'​ \ 
-'​--enable-posix=shared'​ '​--with-unixODBC=shared,/​usr'​ '​--enable-fileinfo=shared'​ '​--enable-intl=shared'​ \ 
-'​--with-icu-dir=/​usr'​ '​--with-enchant=shared,/​usr'​ '​--with-recode=shared,/​usr'​ 
-</​file>​ 
- 
-Another configure example for PHP 5.4 
-<​file>​ 
- '​--with-mysqli'​ '​--with-mysql'​ '​--with-zlib'​ '​--with-gd'​ '​--enable-shmop'​ '​--enable-sockets'​ '​--enable-sysvsem'​ '​--enable-sysvshm'​ '​--enable-sysvmsg'​ '​--enable-mbstring'​ '​--with-iconv'​ '​--with-mcrypt'​ '​--enable-pdo'​ '​--with-pdo-mysql'​ '​--with-curl'​ '​--with-litespeed'​ '​--enable-bcmath'​ '​--with-bz2'​ '​--enable-calendar'​ '​--enable-ftp'​ '​--with-openssl'​ '​--with-gettext'​ '​--with-mhash'​ '​--enable-soap'​ 
-</​file>​ 
-  ​ 
-Compile PHP from LSWS Admin Console (Actions => Compile PHP) with mod_php compile options. 
-  
-**Note:** '​./​configure'​ needs to be removed when cut and paste to LSWS Admin Console. That is, just cut and paste the options above starting from "'​--build=x86_64-redhat-linux-gnu'​ '​--host=x86_64-redhat-linux-gnu'​ ..." (remove "​Configure Command =>  '​./​configure'​ ") 
  • Admin
  • Last modified: 2015/07/07 15:41
  • by Jackson Zhang