By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,643 Members | 1,797 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,643 IT Pros & Developers. It's quick & easy.

Questions about PHP-GTK 1.0

P: n/a
Supposedly PHP-GTK is the ticket one can take to create cross-platform
PHP scripts that load a standalone GUI application with widgets, and
then everything else you know about PHP can work in the background via
signals (widget events), including database access, etc.

Some background for you:
http://www.sitepoint.com/article/697

Personally, I can't get it working. Others have, strangely enough.

1. I have RH9. Does anyone have an RH9 RPM out there for PHP-GTK 1?

2. Would it be good for me to install Glade to draw the GUIs and
connect the signal handlers faster? I don't have experience with
Glade.

3. I tried downloading the 1.0 source and then doing:

../buildconf
../configure
make
make install

but it bombs on ./configure with...

../configure: line 2606: syntax error near unexpected token `debug,'
../configure: line 2606: `PHP_GTK_ARG_ENABLE(debug, whether to include
debugging
symbols,'

Anyone have any advice?

4. I tried the steps recommended in the sitepoint.com web link I
posted (above) and it showed the same error, so I commented out the
code block starting with if on line 2606 to its following fi. Then, I
ran the commands as recommended from the web link, it runs good for
awhile and then spits back to me this error:

/home/me/installs/php-gtk/build/dynlib.mk:22:
/home/me/installs/php-gtk//libs.mk: No such file or directory
make: *** No rule to make target `/home/me/installs/php-gtk//libs.mk'.
Stop.

What's the catch?

I have a funny feeling that the install process is botched at
gtk.php.net on this revision and that they need to fix that.
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Google Mike wrote:

3. I tried downloading the 1.0 source and then doing:

./buildconf
./configure
make
make install


The problem is the configure-generation scripts are for older versions
of autoconf/automake. So to get it to work, the procedure should be:
../buildconf
aclocal
../buildconf
../configure
make
make install

Jul 17 '05 #2

P: n/a
Keith Bowes <do****@spam.me> wrote in message news:<1068089587.220169@rh9cache2>...
Google Mike wrote:

3. I tried downloading the 1.0 source and then doing:

./buildconf
./configure
make
make install


The problem is the configure-generation scripts are for older versions
of autoconf/automake. So to get it to work, the procedure should be:
./buildconf
aclocal
./buildconf
./configure
make
make install


That seemed to move it through the install process, although not
without some occasional warning messages. Now when I try:

cd test
php --q hello.php

It spits out:
X-Powered-By: PHP/4.2.2
Content-type: text/html

<br />
<b>Warning</b>: Unable to load dynamic library
'/usr/lib/php4/php_gtk.PHP_SHLIB_SUFFIX' -
/usr/lib/php4/php_gtk.PHP_SHLIB_SUFFIX: cannot open shared object
file: No such file or directory in
<b>/home/mike/installs/php-gtk-1.0.0/test/hello.php</b> on line
<b>5</b><br />
<br />
<b>Fatal error</b>: Cannot instantiate non-existent class: gtkwindow
in <b>/home/mike/installs/php-gtk-1.0.0/test/hello.php</b> on line
<b>40</b><br />

....so I have 2 questions with that:

1) Why is it spitting back HTML to my console?
2) What do I do about Cannot instantiate non-existing class gtkwindow?
Jul 17 '05 #3

P: n/a
Google Mike wrote:
./buildconf
aclocal
./buildconf
./configure
make
make install

That seemed to move it through the install process, although not
without some occasional warning messages. Now when I try:

cd test
php --q hello.php

It spits out:
X-Powered-By: PHP/4.2.2
Content-type: text/html

<br />
<b>Warning</b>: Unable to load dynamic library
'/usr/lib/php4/php_gtk.PHP_SHLIB_SUFFIX' -
/usr/lib/php4/php_gtk.PHP_SHLIB_SUFFIX: cannot open shared object
file: No such file or directory in
<b>/home/mike/installs/php-gtk-1.0.0/test/hello.php</b> on line
<b>5</b><br />
<br />
<b>Fatal error</b>: Cannot instantiate non-existent class: gtkwindow
in <b>/home/mike/installs/php-gtk-1.0.0/test/hello.php</b> on line
<b>40</b><br />

...so I have 2 questions with that:

1) Why is it spitting back HTML to my console?


Because you're using a CGI build rather than a CLI one.
2) What do I do about Cannot instantiate non-existing class gtkwindow?


The problem is that you're using PHP 4.2.2 but the examples use the
PHP_SHLIB_SUFFIX constant, which wasn't added until 4.3.0. Change the
code in the example file from
dl('php_gtk.'.PHP_SHLIB_SUFFIX)

to
dl('php_gtk.so')

and it should work fine.

Jul 17 '05 #4

P: n/a
I tried the dl change but now it says that php_gtk.so isn't there. I
went looking all over my hard drive for it and cannot find it. I guess
the install process is just plain botched. Someone could stand to make
an RPM for RH9 for this -- this is a monster to work through, and yet
yields so much promise. Right now, the only way to do anything
comparable to php-gtk is to use Python and Glade, and I don't find
Python very agreeable to me.
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.