Running PHP 5.2 and 5.3 On The Same Server

Running PHP 5.2 and 5.3 On The Same Server

Even though most of PHP applications is now running with PHP version 5.3, there are a few PHP applications are still running on PHP version 5.2, you can see what makes that thing happens here: http://php.net/manual/en/migration53.incompatible.php

So i guess it will be good for PHP programmer / developer to have PHP version 5.2 and 5.3 installed and running on the same machine (more economical than using two machines for each PHP version). So let’s get started.

Anyway i will use NginX as the webserver, so the main principle of two PHP version running on the same machine is CGI works using different localhost port.

Before installing PHP, we usually install webserver and database first, i assume that you all have installed NginX and MySQL, so i just skip to the PHP installation.

note: the configuration below is my usual config and dependencies, if you are experiencing error while configure or make php, try to find out about the missing dependencies by looking at this blog’s older posts or googling. The first four configuration of PHP will be the important note because we will separate PHP 5.3 and 5.2 configuration (php.ini) path.

--prefix=/usr/local53 --libdir=/usr/local53/lib --with-libdir=lib --with-config-file-path=/usr/local53/lib
--prefix=/usr/local52 --libdir=/usr/local52/lib --with-libdir=lib --with-config-file-path=/usr/local52/lib

Install PHP 5.3.8 with PHP-FPM

wget http://pkgs.serversreview.net/files/autoconf-2.13.tar.gz
tar -zxvf autoconf-2.13.tar.gz
cd autoconf-2.13
./configure
make && make install

wget http://pkgs.serversreview.net/files/php-5.3.8.tar.gz
tar -zxvf php-5.3.8.tar.gz
cd php-5.3.8
./buildconf --force
./configure --prefix=/usr/local53 --libdir=/usr/local53/lib --with-libdir=lib --with-config-file-path=/usr/local53/lib --enable-force-cgi-redirect --enable-fpm --enable-cli --with-mcrypt --enable-mbstring --with-openssl --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql=/usr/local/mysql --with-gd --with-zlib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-png --with-jpeg --with-gmp --with-sqlite --enable-pdo --with-xpm-dir=/usr/lib --with-freetype-dir=/usr/include/freetype2 --with-ttf=/usr/include/freetype2 --enable-gd-native-ttf --enable-fileinfo --disable-debug --with-pic --with-bz2 --with-curl --with-curlwrappers --without-gdbm --with-gettext --with-iconv --with-pspell --with-pcre-regex --with-imap --with-imap-ssl=/usr/lib --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --disable-sysvsem --disable-sysvshm --disable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic --with-system-tzdata --with-odbc --enable-gd-jis-conv --enable-dom --disable-dba --enable-xmlreader --enable-xmlwriter --with-tidy  --with-xml --with-xmlrpc --with-xsl --enable-bcmath --enable-soap --enable-zip --enable-inline-optimization --with-mhash --enable-mbregex
make
make install

cp php.ini-production /usr/local53/lib/php.ini

(more…)

{ 0 comments }

About OpenNebula and Amazon EC2

About OpenNebula and Amazon EC2

OpenNebula is a medium providing the ability to manage a gather of virtual resources. Did know it was possible to make virtual machines and adjust them as you would configure an actual machine attached your network. Dissimilarity with Amazon EC2 and OpenNebula (and the next cloud hosting provider) is that Amazon EC2 is not a private service. Not just OpenNebula which having a unit supervision application which they use to allow those virtual resources to guys in a pay-just like-you-go method, Amazon EC2 is having it too. If you want, you can use OpenNebula to provide alike type of service to subscribers inside your network. In case if you require to be another cloud care provider similar Amazon, if you want, you can very easily fit OpenNebula to help that too. You merely have to compose a front-end which restricts creation of virtual machines merely soon after a payment is done (high-level case). OpenNebula also has an XMLRPC interface via which Did know it was possible to interface with through one more application created in a different kinds of programming language. On top of that, OpenNebula supplies a driver which crack it’s capabilities across the libvirt API.

Do you have any idea regarding libvirt? Libvirt is a sacrifice to turn up with an API because of every type of virtualization platforms. Also, it does own an adoption (libvirtd) which another superintendence programs can talk to. As an example virt-manager and virsh are two of software which can speak to main virtualization platforms such thus KVM and Xen across libvirt.

Going a level farther than libvirt, OpenNebula accommodates the creation of connections, increasing group nodes and deploying virtual machines. On top of that, OpenNebula approaches with a scheduler which will deploy a transferred virtual machine on the group. Scheduling policies can be set up and Should more problematic rules are required those can be produced through Haizea, OpenNebula’s plug and play scheduler. OpenNebula holds all these informations in an SQLite database accessible from other type of programming language Should those info will need to be pulled out. A good to possess characteristic would be an API that furnishes all kinds of data kept in the SQLite database.

{ 0 comments }

Advanced Technology Presented by CakePHP

Advanced Technology Presented by CakePHP

At Present, at any time аnу nеw tech approaches all round, central qυеѕtіοn thаt circulates іѕ frequently in regard to thе cause tο switch thе existing one οr thе need behind thе surfacing οf аn advanced class. Similar things dο exist whіlе cakePHP comes іntο snapshot. Thіѕ іѕ a subject hugely obvious thаt whіlе working wіth аnу class οf PHP οr cakePHP, thе fundamental programming language wουld bе common аnd іn thіѕ case, іt wουld bе PHP. Whіlе pinpointing size able prey οr a lesser one thе essential wουld bе open source PHP technique.

How does the cakePHP do the difference?

Thеrе аrе some contrasts thаt affect thе cakePHP system absolutely different. Starting wіth thе framework οf thе cakePHP, as well as аn open source technology, іt dοеѕ nοt own аnу variety οf architectural head pain. It predominantly depends onto іtѕ version view controller; іt supports a good coding arrange.

Thе designing and programming portion іѕ dis-part away ѕο thаt a сlеаn coding combination саn bе sustained. Still working wіth such architecture requirements a substantial method studying еlѕе formulating thе expected software wουld bе make difficult.

Thе basic coding follows thе PHP code therefore corresponding thе fitness wіth thе cakePHP іѕ vastly substantial. Hοwеνеr, cakePHP exhibits thе fitness wіth various models οf PHP technique lіkе PHP version 4 аnd PHP version 5. Thаt іѕ somehow hugely useful tο thе apps developers. Thіѕ implies, cakePHP wіll assist every thе usual characteristic аnd favor numerous applications tο gеt adjusted. Thе developers whο work іn PHP wіll hаνе аn extra pleasure tο do the job wіth cakePHP аѕ thе coding wіll bе easier.

In which time web development approaches іntο picture, database management іѕ supposed tο an exceptionally crucial issue.

Nevertheless wіth cakePHP, managing the database іѕ a lot improved аnd easy because of controlled via CRUD integration. Thе elementary attributes οf database аrе nevertheless taken care οf аnd together wіth thаt additional functionalities аrе blended fοr іtѕ well maintenance. Thе science’s developed іn validation helps іn saving οf time frame аnd serves an enhanced medium tο work with wіth users.

Being a growing modern technology, cakePHP іѕ surely аn crucial programming progress thаt саn deal with thе present day techie’s objectives. Changing οf advances іѕ effective whеn thеу in fact demonstrate tο bе useful іn thе website design do the job. Sο, check out cakePHP whеrе уου requirement tο satisfy a part diverse!

{ 0 comments }

Lighttpd, PHP with PHP-FPM, and MySQL Under Ubuntu Maverick

Lighttpd, PHP with PHP-FPM, and MySQL Under Ubuntu Maverick

It is time for Lighttpd the “Fly Light” webserver installation include PHP and MySQL under Ubuntu 10.10 Maverick, let’s go!

First, update repository list, install dependencies, and remove unneeded modules

apt-get update -y
apt-get install -y build-essential make automake patch cadaver bc netcat libgeoip1 libgeoip-dev fontconfig libfontconfig-dev libpam0g-dev libpam-devperm ldap-utils libldap-2.4-2 libldap2-dev libdb4.6 libxpm-dev libtool libaio-dev libltdl3-dev mcrypt libmcrypt-dev libmhash-dev unixodbc unixodbc-dev zip unzip nano perl openssl libssl-dev libdevel-repl-perl libperl-dev libpcre3 libpcre3-dev libjpeg62 libjpeg62-dev libpng-dev libtiff4 libtiff-dev libfreetype6 libfreetype6-dev libgmp3-dev aspell libaspell-dev libpspell-dev libiconv-ruby mlocate libc-client2007e libc-client2007e-dev uw-imapd tidy libtidy-dev libbz2-dev gamin libgamin-dev sqlite3 libsqlite3-dev libreadline6 libreadline6-dev e2fsprogs uuid-dev memcached libmemcache-dev
apt-get remove -y apache2 apache2-doc apache2-utils apache2.2-common bind9 php5 mysql-server curl libcurl3 libcurl-dev libidn11 libidn11-dev libxslt-dev

pkill apache2
pkill named
pkill sendmail-mta

Install additional modules

wget http://pkgs.serversreview.net/files/gd-2.0.33.tar.gz
tar -zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr --libdir=/usr/lib --with-png=/usr/lib --with-freetype=/usr/lib --with-fontconfig=/usr/lib --with-jpeg=/usr/lib --with-xpm=/usr/lib
make
make install

wget http://pkgs.serversreview.net/files/libev-4.04.tar.gz
tar -zxvf libev-4.04.tar.gz
cd libev-4.04
./configure --prefix=/usr --libdir=/usr/lib --with-pic 
make
make install

wget http://pkgs.serversreview.net/files/gnupg-1.4.11.tar.gz
tar -zxvf gnupg-1.4.11.tar.gz
cd gnupg-1.4.11
./configure --prefix=/usr --libdir=/usr/lib
make
make install

wget libidn-1.9.tar.gz http://pkgs.serversreview.net/files/libidn-1.9.tar.gz
tar -zxvf libidn-1.9.tar.gz
cd libidn-1.9
./configure --prefix=/usr --libdir=/usr/lib
make
make install

wget http://pkgs.serversreview.net/files/curl-7.21.6.tar.gz
tar -zxvf curl-7.21.6.tar.gz
cd curl-7.21.6
./configure --prefix=/usr --libdir=/usr/lib --with-openssl --with-libidn  --enable-ipv6
make
make install

wget http://pkgs.serversreview.net/files/libxml2-2.7.8.tar.gz
tar -zxvf libxml2-2.7.8.tar.gz
cd libxml2-2.7.8
rm -rf /usr/lib/libxml2*
./configure --prefix=/usr --libdir=/usr/lib
make
make install

wget http://pkgs.serversreview.net/files/libxslt-1.1.26.tar.gz
tar -zxvf libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
rm -rf /usr/lib/libxslt* /usr/lib/libexslt*
./configure --prefix=/usr --libdir=/usr/lib
make
make install

wget http://pkgs.serversreview.net/files/lua-5.1.4.tar.gz
tar -zxvf lua-5.1.4.tar.gz
cd lua-5.1.4
sed -i 's/\/usr\/local/\/usr/g' Makefile
#if x86_64 then
#edit src/Makefile
#change CFLAGS= -O2 -Wall $(MYCFLAGS)
#with CFLAGS= -O2 -Wall -fPIC $(MYCFLAGS)
make linux install

wget http://pkgs.serversreview.net/files/valgrind-3.6.1.tar.bz2
tar -jxvf valgrind-3.6.1.tar.bz2
cd valgrind-3.6.1
./configure --prefix=/usr --libdir=/usr/lib
make
make install

wget http://pkgs.serversreview.net/files/libevent-2.0.11-stable.tar.gz
tar -zxvf libevent-2.0.11-stable.tar.gz
cd libevent-2.0.11-stable
./configure --prefix=/usr --libdir=/usr/lib
make
make install

wget http://pkgs.serversreview.net/files/gdbm-1.8.3.tar.gz
tar -zxvf gdbm-1.8.3.tar.gz
cd gdbm-1.8.3
./configure --prefix=/usr --libdir=/usr/lib
make
make install

(more…)

{ 0 comments }