Firebird News

Monday, March 31, 2014

Compiling Linux Kernel 3.xx.x Vanilla Final - Ubuntu/Debian way

Here is my guide on Compiling 3.xx.x Vanilla Final - Ubuntu/Debian using the Debian way

This article is about compiling a kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org (vanilla kernel) so that you are independent from the kernels supplied by your distribution.
Install the Required packages for building it
 
apt-get install git-core kernel-package fakeroot build-essential ncurses-dev
Then download latest kernel version
cd /usr/src
sudo su 
wget --continue http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.xx.x.tar.bz2
tar jxvf linux-3.*.*.tar.bz2
cd linux-3.*.*

$ cp /boot/config-`uname -r` ./.config
$ make menuconfig

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-vanillaice kernel_image kernel_headers
cd ..
dpkg -i linux-image-3.*.*
dpkg -i linux-headers-3.*.*
sudo shutdown -r now

you can install the headers too from /usr/src/linux-headers-3.*.*-*
in my case i can show you how the packages are named
ls *.deb
linux-image-3.*.*-vanillaice_4.4.*-vanillaice-10.00.Custom_amd64.deb
linux-headers-3.*.*-vanillaice_4.4.*-vanillaice-10.00.Custom_amd64.deb

I also created a python script http://github.com/mariuz/kernelcompile

that can be used like this
git clone https://mariuz@github.com/mariuz/kernelcompile.git
cd kernelcompile
sudo ./kernel-compile.py

Friday, March 14, 2014

php5 and firebird pdo on ubuntu / debian

The recommendd method is to use the official php5 source from ubuntu or debian and build only the pdo firebird extension and install it
sudo apt-get install php5-dev firebird2.5-dev php-pear devscripts debget

You need to build the pdo extension from php from ubuntu source code here is the source for php package (apt-get source will do the job for any release)
apt-get source php5
cd php5-*
cd ext/pdo_firebird
phpize
sudo ln -s /usr/include/php5 /usr/include/php
./configure
make
sudo make install 

Check to have in php.ini to have the next lines also with phpinfo() function

sudo pico/vi /etc/php5/conf.d/pdo.ini
# configuration for php PDO module
extension=pdo.so
extension=pdo_firebird.so


php -i | grep PDO
PDO
PDO support => enabled
PDO drivers => firebird
PDO_Firebird
PDO Driver for Firebird/InterBase => enabled

you can also check in apache if all is correct
by creating a page in /var/www/pdo_info.php
with this content



then in the browser press F3 and search PDO , here is my phpinfo()
to check if all is ok with the driver then create one small example that loads the driver and then is connecting to the database server



after the driver is loaded now you can use the pdo as usual , here is the fetch example