Skip to content

Instantly share code, notes, and snippets.

@yevgenko
Forked from g-alonso/compile.php5.3.25.txt
Last active August 29, 2015 14:24
Show Gist options
  • Save yevgenko/6f356a50a2f17d88c975 to your computer and use it in GitHub Desktop.
Save yevgenko/6f356a50a2f17d88c975 to your computer and use it in GitHub Desktop.
http://phpconfigure.com/
See before:
compile.mysql5.6.12.txt & compile.apache2.4.4.txt
Compile php 5.3.25
sudo mkdir /usr/local/php
sudo mkdir /usr/local/php/php_5.3.25
#Errors
#configure: error: xml2-config not found. Please check your libxml2 installation.
sudo apt-get install libxml2-dev
#configure: error: Cannot find OpenSSL's <evp.h>
sudo apt-get install libssl-dev
#configure: error: png.h not found.
sudo apt-get install libpng12-dev
#configure: error: mcrypt.h not found. Please reinstall libmcrypt.
sudo apt-get install libmcrypt-dev
#checking for TIDY support... yes
#configure: error: Cannot find libtidy
sudo apt-get install libtidy-dev
#configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
sudo apt-get install libxslt-dev
./configure \
--prefix=/usr/local/php/php_5.3.25 \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-libxml \
--enable-magic-quotes \
--enable-mbstring \
--enable-pdo \
--enable-sockets \
--enable-zip \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-curl \
--with-curlwrappers \
--with-gd \
--with-gettext \
--with-mcrypt \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-openssl \
--with-pdo-mysql=mysqlnd \
--with-pdo-sqlite \
--with-pic \
--with-sqlite \
--with-tidy \
--with-xmlrpc \
--with-xsl \
--with-zlib
#--with-libdir=lib64
sudo cp php.ini-development /usr/local/php/php_5.3.25/lib/php.ini
mkdir /usr/local/php/php_5.3.25/modules
sudo mv /usr/local/apache2/modules/libphp5.so /usr/local/php/php_5.3.25/modules/
sudo ln -s /usr/local/php/php_5.3.25/modules/libphp5.so /usr/local/apache2/modules/libphp5.so
#in httpd.conf add
AddType application/x-httpd-php .php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment