One of PHP's nifty extensions is PHP-Gtk which acts as wrapper around the GTK library. Under Ubuntu Gusty Gibbons with the use of the synaptic package manager, installing this extension is simple.
First update your current repositories:
Next, install some packages required for Gtk
Quote:
|
sudo apt-get install php5-cli php5-dev php5-gd libgtk2.0-dev libglade2-dev
|
If you haven't installed the build essentials, now would be a good time to do so:
Quote:
|
sudo apt-get install build-essential
|
If you haven't installed the cvs package, you also need to do that:
Now connect to the repository: <press enter when prompted for a password>
Quote:
|
cvs -d :pserver:cvsread@cvs.php.net:/repository login
|
Check out the necessary files:
Quote:
|
cvs -d :pserver:cvsread@cvs.php.net:/repository co php-gtk
|
Change to the new php-gtk directory:
Then run the following commands: [one line at a time]
Quote:
./buildconf
./configure
make
sudo make install
|
Open your php.ini
Quote:
|
sudo nano /etc/php5/cli/php.ini
|
Scroll to the extensions section and add the following line:
Finally, test your installation by typing the following line:
which should echo a single line that says:
Thanks it!