| View previous topic :: View next topic |
| Author |
Message |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Sun Mar 18, 2007 8:00 pm Post subject: no php-gtk |
|
|
I got the following error when i tried to install Gtk2_EntryDialog
pear install Gtk2_EntryDialog
pear/Gtk2_EntryDialog requires PHP extension "php-gtk" (version >= 2.0.0dev)
No valid packages found
install failed
now i tried to run yum search php-gtk but it doen't finds it. Any ideas?Preferably without recompiling php:P |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Sun Mar 18, 2007 8:56 pm Post subject: Re: no php-gtk |
|
|
| robertos wrote: | I got the following error when i tried to install Gtk2_EntryDialog
pear install Gtk2_EntryDialog
pear/Gtk2_EntryDialog requires PHP extension "php-gtk" (version >= 2.0.0dev)
No valid packages found
install failed
now i tried to run yum search php-gtk but it doen't finds it. Any ideas?Preferably without recompiling php:P |
Information about GTK can be found here: http://gtk.php.net/ |
|
| Back to top |
|
 |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Sun Mar 18, 2007 9:44 pm Post subject: |
|
|
Yeah,thanks i got it to work,i have compiled it as an add-on.
The only problem is that now when i use the first example from the pear GTK2 package
"Fatal error: Class 'GtkMessageDialog' not found in /usr/share/pear/Gtk2/EntryDialog.php on line 23"
Any ideas? Where do i get that file from? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Sun Mar 18, 2007 9:47 pm Post subject: |
|
|
| robertos wrote: | Yeah,thanks i got it to work,i have compiled it as an add-on.
The only problem is that now when i use the first example from the pear GTK2 package
"Fatal error: Class 'GtkMessageDialog' not found in /usr/share/pear/Gtk2/EntryDialog.php on line 23"
Any ideas? Where do i get that file from? |
It is a part of GTK: http://gtk.php.net/manual/en/gtk.gtkmessagedialog.php |
|
| Back to top |
|
 |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Sun Mar 18, 2007 9:55 pm Post subject: |
|
|
Yeah ok,but i don't understand something
i have this line in EntryDialog.php from the pear package:
*/
class Gtk2_EntryDialog extends GtkMessageDialog
{
/**
And no file to include the GtkMessageDialog so it's not defined.
Btw. when i do php -m | grep gtk,php-gtk appears to be loaded.
But from the browser with phpinfo() it doesn't appear there. Do you think
it's because of this? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Sun Mar 18, 2007 9:57 pm Post subject: |
|
|
| robertos wrote: | Yeah ok,but i don't understand something
i have this line in EntryDialog.php from the pear package:
*/
class Gtk2_EntryDialog extends GtkMessageDialog
{
/**
And no file to include the GtkMessageDialog so it's not defined. |
It's defined in the GTK extension; you won't find a PHP file with this class.
| robertos wrote: | Btw. when i do php -m | grep gtk,php-gtk appears to be loaded.
But from the browser with phpinfo() it doesn't appear there. Do you think
it's because of this? |
It's likely that your CLI version of PHP uses another php.ini than the PHP version that your webserver uses, and that you have enabled the extension only for CLI version. |
|
| Back to top |
|
 |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Sun Mar 18, 2007 10:03 pm Post subject: |
|
|
well i'v read somwhere that i should enable the extention in /etc/php.d/php_gtk2.ini because when i loaded in from /etc/php.ini
i got this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/php_gtk2.so' - /usr/lib/php/modules/php_gtk2.so: undefined symbol: phpi_get_le_gd in Unknown on line 0
php-gtk
Searching about this on google said that my php was not compiled with gd support(and in the configure script from php info shows '--without-gd'). However i can use the gd extension because i have installed it with yum install php-gd..... |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Sun Mar 18, 2007 10:05 pm Post subject: |
|
|
| robertos wrote: | well i'v read somwhere that i should enable the extention in /etc/php.d/php_gtk2.ini because when i loaded in from /etc/php.ini
i got this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/php_gtk2.so' - /usr/lib/php/modules/php_gtk2.so: undefined symbol: phpi_get_le_gd in Unknown on line 0
php-gtk
Searching about this on google said that my php was not compiled with gd support(and in the configure script from php info shows '--without-gd'). However i can use the gd extension because i have installed it with yum install php-gd..... |
Maybe a version conflict? Maybe different PHP installations on your machine? Sorry, I don't know much about Linux and PHP on it. The guys on the GTK mailing lists might be more helpful than this forum on this problem. |
|
| Back to top |
|
 |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Sun Mar 18, 2007 10:07 pm Post subject: |
|
|
| Ok mark thanks for the help! |
|
| Back to top |
|
 |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Sun Mar 18, 2007 10:36 pm Post subject: |
|
|
I have loaded gd before gtk2 in php.ini and now that error dissapeared
extension = gd.so
extension=php_gtk2.so
However know i have some errors in /etc/httpd/logs/error_log.
I'll post the solution if i'll get it from the gtk mailing lists. |
|
| Back to top |
|
 |
robertos
Joined: 17 Mar 2007 Posts: 32
|
Posted: Mon Mar 19, 2007 10:36 am Post subject: |
|
|
actually i was an idiot trying to run the gtk scripts from apache:)
you have to run them with the php cli like this
php script.php
So all you have to do is load gd befeore gtk2 as above! |
|
| Back to top |
|
 |
|