RSS Icon Subscribe to blog feed
RSS Icon Subscribe to post feed

PHP-GTK Ubuntu 64bit deb package

I’ve looked everywhere for a binary deb package for PHP-GTK so I have compiled my own and posted it here to share.  To use it you will have to manually edit your php.ini file but I have writen instructions for this below.

Tested on Jaunty (9.04), Karmic (9.10)

php-gtk_2.0.1-1_amd64.deb

Installation Instructions

Download the deb file for your version of Ubuntu above and double click this file when downloaded.

Once installed you will need to edit your php.ini file to get it to work.

$ sudo gedit /etc/php5/cli/php.ini

In the Dynamic Extensions part of the file add the line extension=php_gtk2.so

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.

extension=php_gtk2.so

You may wish to do a simple test to make sure all is working (taken from http://gtk.php.net/manual/en/tutorials.helloworld.php).

<?php
if (!class_exists('gtk')) {
 die("Please load the php-gtk2 module in your php.ini\r\n");
}

$wnd = new GtkWindow();
$wnd->set_title('Hello world');
$wnd->connect_simple('destroy', array('gtk', 'main_quit'));

$lblHello = new GtkLabel("Just wanted to say\r\n'Hello world!'");
$wnd->add($lblHello);

$wnd->show_all();
Gtk::main();
?>

5 Comments

  1. eaven says:

    Great thank ! Just what i need, you save my time, il love you guy !

  2. JMarc says:

    I use your package with my Debian Squeeze : thank you :)

  3. jeanmarc says:

    Thanks !

  4. TylerA says:

    Thanks! Saves me from compiling it!

Comment

Get a free Giffgaff Sim