Extension's real name?

From: Date: Sat, 18 Sep 2004 13:28:44 +0000
Subject: Extension's real name?
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5096@lists.php.net to get a copy of this message
A lot of example code in various places on the web gives the following to initialise PHP-GTK: if ( (!extension_loaded('gtk'))) { dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); } However, I've found that for some people using my LJ-clients[1], this check doesn't work. In the case that the extension is already loaded, it can become loaded twice, with the result that the interface builds, but that the text in all menus and buttons is missing (but present in text fields). When I check get_loaded_extentions(), it tells me that the relevant name is "php-gtk" rather than 'gtk'. Any idea why the initial example is so prevalent? Did the extention name change at some point? The code I've changed to in the latest release is: if ( (!extension_loaded('gtk')) || (!extension_loaded('php-gtk')) ) { # Slight uncertainty in the docs about what the extension's really called! dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); } Is there a better solution than this? I suppose I could use class_exists('gtkwindow') but that's really not elegant. Thanks, Wechsler [1] http://www.livejournal.com/userinfo.bml?user=phaseclients

« previous php.gtk.general (#5096) next »