Bug 459548 - Review Request: php-gtk - GTK PHP extension
Summary: Review Request: php-gtk - GTK PHP extension
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-08-19 22:06 UTC by Patrice FERLET
Modified: 2010-11-01 14:46 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-11-14 18:31:41 UTC
Type: ---

Attachments (Terms of Use)
php-gtk-2.0.0 compiled against Fedora's PHP 5.2.6 (4.92 MB, application/octet-stream)
2008-08-23 13:20 UTC, Keith Roberts
no flags Details
Screen shot of PHP5 running a php-gtk enabled script (210.54 KB, image/jpeg)
2008-08-24 17:02 UTC, Keith Roberts
no flags Details

Description Patrice FERLET 2008-08-19 22:06:05 UTC
Spec URL: http://www.metal3d.org/repo/fedora/9/SPECS/php-gtk2.spec
SRPM URL: http://www.metal3d.org/repo/fedora/9/SRPMS/php-gtk-2.0.1-1.fc9.metal3d.src.rpm
PHP-GTK is an extension for the PHP programming language that 
implements language bindings for GTK+. It provides an object-oriented 
interface to GTK+ classes and functions and greatly simplifies
writing client-side cross-platform GUI applications

RPMlint output:
[builder@localhost ~]$ rpmlint rpmbuild/RPMS/i386/php-gtk-2.0.1-1.fc9.metal3d.i386.rpm 
php-gtk.i386: W: incoherent-version-in-changelog 2.0.1-1.fc9 2.0.1-1.fc9.metal3d
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

That's because I used my repotag "metal3d"

Examples are in /usr/share/ php-gtk documentation after install. It works great :)

Comment 1 Patrice FERLET 2008-08-20 22:51:00 UTC
Spec URL: http://www.metal3d.org/repo/fedora/9/SPECS/php-gtk2.spec

New release, this is some ideas taken on:
http://rpms.famillecollet.com/files/php-gtk.spec for PHP 5.3

I need to be sponsored, if someone can help me...

Comment 2 Keith Roberts 2008-08-23 13:11:58 UTC
Will this work on Fedora 8 please? I have compiled php-gtk-2.0.0 on Fedora 8, but when I load it as a PHP extension it breaks my connections to localhost.

Comment 3 Keith Roberts 2008-08-23 13:20:03 UTC
Created attachment 314865 [details]
php-gtk-2.0.0 compiled against Fedora's PHP 5.2.6 

[root@karsites modules]# php -v
PHP 5.2.6 (cli) (built: May  8 2008 08:53:44)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

When I tell php.ini to load the php_gtk2.so  extension, I cannot access a file with phpinfo() function from my browser. I get 'connection to localhost is broken'. I get that with *anything* I try to load into my browser with this extension loaded. As soon as I remove the extension and restart httpd, the error goes away.

Comment 4 Keith Roberts 2008-08-24 17:00:03 UTC
My problem appears I was trying to use the same /etc/php.ini for my apache web server as well as for the CLI version of PHP. I made another php.ini file, and used that for loading and running the php_gtk2.so extension. Then used the following C/L to run a php-gtk test script:

[root@karsites demos]# php -c /etc/php-cli/php.ini -f phpgtk2-demo.php

This works OK now, as you can see by the enclosed attachment.

Comment 5 Keith Roberts 2008-08-24 17:02:43 UTC
Created attachment 314885 [details]
Screen shot of PHP5 running a php-gtk enabled script

Comment 6 Patrice FERLET 2008-09-08 16:02:43 UTC
yes, in fact you don't have to run "php" but "php-gtk". This is done to not enable gtk extension in php.ini wich can create errors with Apache.

php-gtk script (installed with package) will enable extension to run you script.


Comment 7 Itamar Reis Peixoto 2009-01-19 03:23:20 UTC
please fix %patch line

should be somthing like this

%Patch0 -p1

this is your first package ?

what's your fedora account (FAS) user name ?

Comment 8 Patrice FERLET 2009-01-19 09:30:46 UTC

I will fix and do some changes for F10. Another problem appears with xulrunner that I have to correct.

I've got a lot of work since 6 month, but I will have more time soon...

I've already done some packages for my own repository, but none has ever been registered with Fedora.

I have no FAS for now.


Comment 9 Itamar Reis Peixoto 2009-01-19 10:58:46 UTC
unfortunately I can't review your package you need to be sponsored first

please follow the guidelines.


look at "Get a Fedora Account"

Comment 10 Patrice FERLET 2009-01-19 11:06:59 UTC
I already ask for sponsor when I packaged Screenlets (refused because licence was not really free...) and roadsend-PHP...

I've got aloready read this page, but I don't know why my demand was not accepted again (since 1 year).

So, if someone can sponsor :) help !

Have I to create a review with a new subject ?

Comment 11 Itamar Reis Peixoto 2009-01-19 11:18:30 UTC


what's your fedora account name in Fedora Account System (FAS) ?

when you finish to create your account please join the fedora package group in FAS.

to get sponsored please post your fas username here.

Comment 12 Patrice FERLET 2009-01-19 13:57:37 UTC
Alright, I have created my account. I didn't undestood what was missing :)

Ok my FAS is "metal3d".

Thanks !

Comment 13 Renich Bon Ciric 2009-05-01 04:59:27 UTC
what has happened with this?

Comment 14 Patrice FERLET 2009-06-17 09:51:11 UTC
Since several month I'm full of work and I couldn't work on packages. I will work on my packages soon.

For now, I have to use F11 and recompile my packages.


Comment 15 Mamoru TASAKA 2009-07-11 16:36:01 UTC

Patrice, would you still want to import this package into
Fedora? If so, please post your newest spec/srpm again and
I will try to review this ticket.

Comment 16 skaterkate103 2009-07-21 18:14:39 UTC
Patrice, have you already compiled a package for F11?

Comment 17 skaterkate103 2009-07-22 00:45:24 UTC
Patrice, have you already compiled a package for F11?

Comment 18 Remi Collet 2009-07-22 15:40:28 UTC
AFAIR it doesn't build against php 5.3 (now in rawhide) this is the main reason why i didn't do the review...


Comment 19 Patrice FERLET 2009-08-31 10:01:12 UTC
Excuse me, really buzy this last months (preparing my wedding, holliday...) so I'm back now !

I will recreate package tonight ! Thanks 


Comment 20 Renich Bon Ciric 2009-08-31 18:23:12 UTC
Whoa! Well, here in México, to the guys, we say "I'm so sorry!" I hope you enjoy your vacation ;)

Oh, yeah... and... the package... yeah

Comment 21 Patrice FERLET 2009-09-02 07:58:07 UTC
Package has some compilation troubles, but I know how to correct. I think it will be readdy this week :)

Comment 22 Patrice FERLET 2009-09-04 07:47:44 UTC
Compiles on fedora 11... not rawhide. I did some modifications and I will put it on my server today.

Rawhide uses PHP 5.3 and PHP-GTK doesn't compile. I know that Remy Collet tries to compile.

Comment 23 Mamoru TASAKA 2009-09-04 07:55:20 UTC
Well, actually I don't know PHP well, however if you have a srpm
which compiles on F-11, it is highly appreciated if you upload
the srpm anyway. Maybe someone (maybe including me) can help with
get your srpm built on rawhide.

Comment 24 Remi Collet 2009-09-06 05:59:38 UTC
Yes it doesn't build against php 5.3.0, even CVS version (it's the main reason why I didn't do the review as I'm using it for more than a year)

I have also note than for EL5, you need to set the LD_LIBRARY_PATH to xulrunnner library directory (to be check again, my tests are old).

As my tests are quite old, I will do more with latest SVN where some commit seems php 5.3.0 related.

If ok, it seems reasonnable to do a review for 2.0.1 stable for fedora 10+11 and for a SVN snapshot for rawhide (various other extension runs beta or patched version in rawhide for this)

Comment 25 Mamoru TASAKA 2009-09-06 10:11:49 UTC
Well, while I am not familiar with PHP:

I based on http://www.metal3d.org/repo/fedora/9/SRPMS/ ,
modified for rawhide and succeeded to build on rawhide:
srpm is under
! Note that I just tried to build on rawhide and did not
  try anything else (i.e I have not checked any packaging
  guideline issue)

Two thing:
- The reason vanilla php-gtk 2.0.1 won't build due to error messages
ext/gtk+/gen_gtk.c: At top level:
ext/gtk+/gen_gtk.c:1531: error: duplicate 'static'
ext/gtk+/gen_gtk.c:1542: error: duplicate 'static'
ext/gtk+/gen_gtk.c:1548: error: duplicate 'static'
ext/gtk+/gen_gtk.c:1554: error: duplicate 'static'
  is due to a slight API change in /usr/include/php/Zend/zend_API.h:
 #define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args)      \
-       zend_arg_info name[] = {                                                                                                        
+       static const zend_arg_info name[] = {                                                                                           
                { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args },

  So simply removing "static" before using ZEND_BEGIN_ARG_INFOXXXXXXX
  in php-gtk source code will solve this.
  The following script is _very slow_ however it will work anyway:
%if 0%{?fedora} >= 12
set +x
echo "Fixing source code for PHP 5.3.0 ..."
grep -rl '^ZEND_' . | while read file
   cp -pf $file $file.orig
   echo -n -e "\tfor $file ... "
      sed -i -e 's|^static$||' $file
      cat $file.orig | while read line
         num=$((num + 1))
         num_a=$((num_a + 1))
         if [ $num_a -ge 10000 ] ; then num_a=0 ; echo -n "*" ; fi
         if [ $hold = 1 ] ; then
            if echo $line | grep -vq '^ZEND_' ; then
              num_b=$((num - 1))
              sed -i -e "${num_b}s|^.*$|static|" $file
         if echo $line | grep -q '^static$' ; then hold=1 ; fi
   echo -e "\tdone"
set -x

- And the following patch is needed

  (the argument of zend_set_timeout() changed)

Comment 26 Mamoru TASAKA 2009-09-09 15:30:25 UTC
So Patrice, would you modify your spec file (if there is something
which needs fixing) and upload the new spec/srpm again?

Comment 27 Mamoru TASAKA 2009-09-09 19:37:03 UTC
By the way it seems parallel make fails sometimes

This build log shows that some needed header files are not
correctly created before some source codes which try to "include"
those header files. So either fixing Makefiles or removing
parallel make is needed.

Comment 28 Patrice FERLET 2009-09-15 09:27:54 UTC
I will add this on spec file. Let me some time to do this. My wedding is this week-end and I'm very very busy for 3-4 days :)

Comment 29 Mamoru TASAKA 2009-10-05 18:40:52 UTC
ping again?

Comment 30 Mamoru TASAKA 2009-10-23 14:20:31 UTC
again ping??

Comment 31 Mamoru TASAKA 2009-11-01 15:56:50 UTC
Again ping?

Comment 32 Mamoru TASAKA 2009-11-07 17:35:00 UTC
I will close this bug as NOTABUG if no response is received from
the reporter with ONE WEEK.

Comment 33 Mamoru TASAKA 2009-11-14 18:31:41 UTC
Once closing.

If someone wants to import this package into Fedora, please open
a new review request and mark this package as a duplicate of
the new one.

Thank you!

Comment 34 Patrice FERLET 2009-11-17 10:27:27 UTC

Sorry for latence... But my account had troubles... And I had problems to login.

For now, PHP-GTK 5.3 won't work... lot of bugs... lot of crashes. I am doing some patches. I know that I take my time to give you fresh news, but please, let me some time...

I packaged 3 other rpms... and time is hard to find ! ;)

Comment 35 Valent Turkovic 2010-11-01 14:46:39 UTC
If you still need php-gui you can follow instructions on how to compile it here:


Note You need to log in before you can comment on or make changes to this bug.