Php-Gtk2 is in Zeta....ZETA? WTF?

All hail the mighty Andrei and hardworking Steph - and many others who have been banging away at php-gtk2. They've finally reached the glorious moment of a zeta release.

I had previously been using the gnope release to develop with - it was pretty nice. I had also installed a version of glade2 for windows, but it broke my gaim installation. So I had to use Trillian for awhile (which has the ugliest UI known to man, btw) and they don't include jabber (googletalk) with the free version. So yuck.

So here's my method for getting the zeta running on WinXPSP2 (with another version of php installed as both a web module for apache and a command line for running scripts) In other words, it has to be self contained.

I do most of my developing on windows. (Don't look at me like that - I have a fedora box I use too - but in cross-platform developing if it'll work on windows, it'll usually work anywhere - beside I love my komodo IDE) First of all, I'm a big fan of glade. Makes life SOOO much easier.

The cooperative glade2 I found is available for windows from wingtk on sourceforge. I like this version because it works with the gtk that gaim installs and doesn't break anything. Wingtk has lots of neat stuff there, but for now wGlade for GTK+ 2 is the only thing I'm using.

Next is php-gtk2 time. I downloaded the zeta for php 5.2 (I like real __toString magic...). I unzipped it and threw in in a rather random spot - no not program files but rather my additional hard drive full of random code. Here comes the fun part. The php exe is utterly stupid. That nice bat to change the path? It doesn't work. Especially when I have another version of php in the path already. So now what?

Windows likes all it's dlls all together. So...I created an /ext folder and threw the two php_gtk dll's in there. Then I took the entire contents of the gtk2.6.9 folder (lock stock and barrel...) cut and pasted it out a directory. Now all those .dlls are parallel to where I'll place my php cli's.
Now over to grab a 5.2 php snap . Now there's a lot of junk in there, so I just grabbed what I really need. php-win.exe and php.exe (I want a version that throws stuff in a cmd window so I can debug, php-win does no window, everything's pretty that way). php5ts.dll, the mime.magic file out of /extras and then the extensions I'm planning on using - exif (ugh, on windows that means mbstring too), gettext, gd2, mime_magic, pdo and pdo_sqlite, and pspell. I'd rather be using fileinfo - but pecl4win doesn't do the 5_2 branch yet...bah.

The php ini needed just a few changes

allow_call_time_pass_reference = off
error_reporting = E_ALL
magic_quotes_gpc = off
register_long_arrays = off
short_open_tag = off

plus loading all those extensions and resetting the extension directory...and finally the thing works. Last but not least I created a windows shortcut and a windows batch file - the .bat is for opening up a command window and using the regular php.exe so I can see the junk that is getting tossed. The shortcut uses php-win.exe to open my current php-gtk2 project.

Now it's playtime!


Be the first to write a comment!

Post a Reply