Jump to content

Setting up PHP-Gtk [Ubuntu]

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
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:

Quote

sudo apt-get update
Next, install the required packages.

Quote

sudo apt-get install build-essential php5-cli php5-dev libgtk2.0-dev libglade2-dev cvs
Log in to the PHP anonymous CVS server (use phpfi as the password):

Quote

cvs -d :pserver:cvsread@cvs.php.net:/repository login
Obtain the PHP-GTK tree.

Quote

cvs -d :pserver:cvsread@cvs.php.net:/repository co php-gtk
Move into the source tree:

Quote

cd php-gtk
Configure and install:

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:

Quote

extension=php_gtk2.so
Finally, test your installation by typing the following line:

Quote

php -m | grep php-gtk
which should echo a single line that says:

Quote

php-gtk
Thats it!

Edited by John, 16 June 2009 - 06:58 PM.
fixed errors


#2
another_sam

another_sam

    Newbie

  • Members
  • Pip
  • 2 posts
I get the next at step 3 (cvs -d :pserver:cvsread@cvs.php.net:/repository login):

Fatal error, aborting.
cvsread: no such user

I'm using Ubuntu 9.04.

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
They have made changes to their repositories since I wrote this. Take a look at the "CVS Version" section here: PHP-GTK : Downloads Between that and this, you should be able to get it installed.

#4
another_sam

another_sam

    Newbie

  • Members
  • Pip
  • 2 posts
I've reached the ./buildconf . The output is:

Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
rebuilding aclocal.m4
rebuilding configure
configure.in:77: warning: LTOPTIONS_VERSION is m4_require'd but not m4_defun'd
aclocal.m4:2912: LT_INIT is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: LTSUGAR_VERSION is m4_require'd but not m4_defun'd
configure.in:77: warning: LTVERSION_VERSION is m4_require'd but not m4_defun'd
configure.in:77: warning: LTOBSOLETE_VERSION is m4_require'd but not m4_defun'd
configure:12798: error: possibly undefined macro: m4_ifval
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:16506: error: possibly undefined macro: _LT_SET_OPTIONS
configure:16506: error: possibly undefined macro: LT_INIT
make[1]: *** [configure] Error 1
make: *** [all] Error 2