Ubuntu repository with PHP-GTK

Hi all. I have set up a small Ubuntu repository (i386) with PHP-GTK (and some other packages), if anyone is interested. I configured PHP-GTK like this:
 ./configure --with-extra --with-html --with-libsexy --with-spell \
  --enable-php-gtk --enable-scintilla --enable-gtkhtml --with-mozembed
And I installed the following dependencies when I compiled it:
aptitude install -y php5-cli cvs php5-dev libglade2-dev \
  php-pear build-essential libgtkhtml3.8-dev libsexy-dev libxul-dev libgtkextra-x11-2.0-1
To set up the repository on your Ubuntu Intrepid do this in a terminal:
sudo wget http://downloads.kaspernj.org/ubuntu/kaspernj.org.sources.list \
    -O /etc/apt/sources.list.d/kaspernj.org.sources.list
sudo aptitude update
sudo aptitude install php5-gtk2
It contains these interesting PHP packages:
  • php5-gtk2 - Develop graphical applications with PHP and GTK.
  • php5-bcompiler - Enables you to compile your PHP-code to bytecode.
  • php5-ssh2 - Enables you to connect to a SSH-server and execute commands, transfer files etc.
  • php5-wbxml - Enables you to read WBXML-files with PHP.
I have also packaged some of my other applications, if any of you want to try them out:
  • knjsms - Send SMS via the danish provider Bibob.
  • knjsqladmin - Manage your SQL-databases, of convert your SQLite3 database to a MySQL-database.
  • knjphpframework - The framework I useually work with (installs in /usr/share/php/knjphpframework).
  • knjgalleryuploader - Upload pictures to your knjGallery.
  • knjtranslate - A small application to translate text via Google Translate.
I have also packaged some of my previous works applications:
  • frifinans-server - The FriFinans server.
  • frifinans-client - The FriFinans client which can connect to a FriFinans server.
If some of you have any special requests for other PHP-packages, I will gladly package them.

Congratulations on this package!

I was wondering: which actual use case for bcompiler did you find in the context of PHP-GTK ?

Some reasons...

Why use bcompiler with PHP-GTK?

"...bcompiler can improve performance by about 30% when used with uncompressed bytecodes..."
"...encode entire script in a proprietary PHP application..."
"...to encode some classes and/or functions in a proprietary PHP application..."
"...to enable the production of php-gtk applications that could be used on client desktops, without the need for a php.exe..."

http://dk2.php.net/manual/en/intro.bcompiler.php

It is nice to have the option of making a proprietary PHP-application - though most of my applications comes as source-code.

On the OpenMoko the 30% performance boost is more than welcome (even though my tests shows that PHP is faster to start up than both Ruby, Java and Python).

--
Regards / Med venlig hilsen
Kasper Johansen

Updates

The "php5-gtk2"-package has been updated.

I added a "postinst"-script, which changes "/etc/php5/cli/php.ini" -> "enable_dl" to "on" instead of the default: "off".

You should load the Gtk2-extension in PHP like this to prevent crashes of other cron-php-scripts like this:

<?php
   dl
("php_gtk2.so");
  
$win = new GtkWindow();
  
Gtk::main();
?>

I also added the relevant dependencies, so the the package actually works out of the box.

--
Regards / Med venlig hilsen
Kasper Johansen

Regarding Glade-3 for this package

Hi!
Yesterday I tried to download this package and use it for Ubuntu 8.10 and it worked like a charm. I created a simple php-gtk script and it worked.

Then I tried to install Glade-3 via (I think it was this command) apt-get install gnome-glade-3
That also worked without any problems. I was able to create a .glade-file with the GUI editor.

But I have only important problem that I don't know how to fix. When I connect my test script to the .glade-file with an example at gtk.php.net documentation website I get the error "Fatal error. Class GladeXML not found". I haven't done any changes to the settings of php-gtk2. I just installed your package but I don't know what to do.

Please can you help me?
Thanks in advance

// Kristian - "Happy Programming!"

x86-64 version ?

Hi Kasper,

Do you plan on adding a x86-64 version ? I'd just like to be able to use your package, since this makes it so simple to install and maintain.

More Consise Instructions Please

Hi I'm confused by your post
I'm running Ubuntu
What are the commands I need to get PHP-GTK working on a fresh Ubuntu desktop install? - Please be concise as I'm a web dev not a C coder! All the other install sep-by-steps I found on the net have failed for me!

What is the command for running a PHP-GTK app?

Thanks v much!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.