Slashdot Mirror


PHP 5 Release Sparks Up PHP-GTK 2.0

joeldg writes "Since the release of PHP5 a lot of interest has reverberated down through the whole PHP community. In particular, there's a call for a PHP-GTK 2.0 which will utilize GTK2 and will have an entire rewrite of it from the ground up to make use of new features. Additionally there is an open call to help add to the documentation and to help with the website, post to and join the php-gtk-general mailing list to follow along with the activity. The forthcoming PHP-GTK version 2.0 will bind GTK+ 2 to PHP 5. Until then, PHP-GTK 1.0.0 works only with PHP 4."

44 comments

  1. Re:etc by Anonymous Coward · · Score: 0

    Amen.

  2. Re:etc by sn0wman3030 · · Score: 1, Informative

    You must be thinking of the old GTK+ (gtk 1). Also, GTK+ 2.4 fixes the ugly file selector problem. The new one is a lot more usable.

    --
    Life is offtopic.
  3. Re:etc by Nasarius · · Score: 0, Flamebait

    GTK2 is still ugly compared to Qt.

    --
    LOAD "SIG",8,1
  4. I still want a wxWindows binding by dJCL · · Score: 3, Interesting

    sure, writing gui code in a web language is more an entertaining trick then really good practice... but I'd still prefer a binding to wxWindows(or whatever they have decided to rename it too) then just gtk...

    That's one of the reasons I bothered to learn python, so I could write once, run anywhere and the code would look native on any given gui

    ah well

    --
    On Arrakis: early worm gets the bird. Magister mundi sum!
    1. Re:I still want a wxWindows binding by tcopeland · · Score: 1

      > bothered to learn python

      WxRuby ain't bad, neither.

    2. Re:I still want a wxWindows binding by Anonymous Coward · · Score: 0

      You can embed python into C applications, hence GTK+ . Also, GTK+ supports a wide variety of language bindings.

    3. Re:I still want a wxWindows binding by Anonymous Coward · · Score: 0

      http://freshmeat.net/projects/php-wx/

  5. Re:etc by mshiltonj · · Score: 1

    GTK2 is still ugly compared to Qt.

    Is Not! (nyaah, nyaah!)

  6. Yessir! Re:I still want a wxWindows binding by samjam · · Score: 1

    Yep.

    wxWidgets is the bees knees and the only widget set library worth playing with IMHO.

    Sam

  7. Re:etc by GreyWolf3000 · · Score: 3, Interesting

    It's all in the theme...you can compare one theme to another in terms of looks, and one widget set to another in terms of performance and functionality.

    --
    Slashdot: Where people pretend to be twice as smart as they really are by behaving like children.
  8. Re:etc by stormcoder · · Score: 0, Offtopic

    But Gentoo does it better! :)

    --
    Sorry my bullshit sensor overloaded.
  9. Other PHP projects... by Dozix007 · · Score: 1

    I am running a PHP project at Uberhacker.Com . The goal of the project is to promote secure PHP programmming. The need has grown due to the recent popularity of the language and the short learning curve which allowed many unexperienced scriptors on the internet.

  10. Re:etc by Nasarius · · Score: 1

    Sure, but I have yet to find a GTK theme that looks decent. Any recommendations for something that would blend well with Plastik? Just something simple, light and clean. The GTK-Qt engine is still very buggy.

    --
    LOAD "SIG",8,1
  11. Re:etc by Anonymous Coward · · Score: 0

    I used the Industrial theme on GNOME. My desktop is KDE, on which I use Plastik, and I must say I prefer Industrial.

  12. I still want a Qt binding by scorp1us · · Score: 1

    With the new class features, Qt and PHP would go well together.

    PHP is the nicest language I know, aside from Javascript. With both I can just think about the data and it arranges it that way. I don't have to deal with the low level issues.

    Qt does the same for windowing.

    It'd be a match made in heaven. For those that want Qt+Javascript, look at KJSEmbed. It's a stnadard part of KDE Bindings.

    --
    Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
    1. Re:I still want a Qt binding by DAldredge · · Score: 5, Funny

      "PHP is the nicest language I know, aside from Javascript."

      That's sad, thats really really really sad. You have NO idea how sad that is, but trust me, it's sad.

      Sad so so sad.

    2. Re:I still want a Qt binding by chromatic · · Score: 1
    3. Re:I still want a Qt binding by scorp1us · · Score: 3, Insightful

      LOL. Even I laughed.

      Well, you have a low UID, so I can't dismiss you right off the bat. ;-) But I've tried the following:
      C, C++, Java, JavaScript, Perl, Python, BASIC (and variant) Fortran, Pascal, and ASM. I've red about LISP, but have yet to actually write in it; though I think its right up my alley.

      I've been around the block enough to not care about the low-level implementation issues. The older you get the less you care about re-inventing the wheel, and you just want to get things to work and get on to the next thing. That's why Linux is turning me off. I just want to install it and get the damned thing working, so I can get working. No etitinf fstab or my Xfree86 config file. No recompiling the kernel, etc. I come back to it periodically and I have to say It's made great strides, so I'm more interested than ever. Programming is very much like that. The more times you've been around the block, the more times you've been down that road, the faster you just want to get where you're going to get your task done. If I'm writing s/w for the space shuttle, I don't want to have to be insmoding drivers, unless I an writing them myself.

      So when I said PHP and JS are nice, it is because they (like most scriping langs) don't bother me with low level implementation issues (unless I want to be bothered by them).

      The other great observation I've made in my many years, is that it's not about the code, it's about the data. C is really bad at allocating memory and designing data structures. PHP and JS make that trivially easy.

      I am a firmware devloper. I work in C 99% of the time. When I'm writing support software for the C code, I do it in some scripting language because it takes 20 times less to develop and I have no performance constraints. For the stuff I'm doing now, I have my scripts generate C files. I also generare SQL files from PHP structures.

      JS and PHP may have thier quirks but such annoyances are [usually] inconsequntial. Dealing with a quirk or too is more time-saving than doing it in a strict, clean language like C.

      What this is all getting to is that PHP and JS are great languages to me and my job. Or, IOW, YMMV.

      --
      Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
    4. Re:I still want a Qt binding by tongue · · Score: 1

      I have to agree with the immediate parent. I've written substantial code in everything from C to Lisp to Python to vimscript, and I have found that for actually getting things done, especially when there's a good library binding available, languages like python, javascript, and php are my platform of choice.

      sure, there have been times I've wanted to do something and couldn't, or couldn't easily--but more often than not, its a function of ignorance, rather than a deficit in the language. and yeah, there are plenty of times I wish the solution was really cross-platform (yeah,i know the languages are technically xp, but typically the library binding isn't) but as i tend to do a lot of browser and web programming its not usually such a big issue. I'm actually kind of excited to see where mono goes, as I like the .Net/java paradigm and I kind of like .Net more for gui programming at this point--but before I start a flame war I haven't done that much GUI work in either one. I can say definitively that the form designers i've used for .Net on win32 have been better than the ones i've used for eclipse, but that could always change.

      anyway, point being, anyone that knocks scripting languages solely because they think compiled is always better is probably a college student who knows just enough to be dangerous.

  13. Yeah yeah yeah by ttfkam · · Score: 1

    Someone wake me when Apache 2.0 support stabilizes for production use. Yes, that includes the database drivers and other support libraries. It's been two years since Apache 2.0 went stable. I mean c'mon.

    Oh yeah, namespaces would be nice too.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:Yeah yeah yeah by Crayon+Kid · · Score: 1

      I guess this would be a good time to puth forth Rasmus Lerdorf's excellent explanation for this issue. In short, due to there being many many different packages and applications and libs on Linux, and not ALL of them being threadsafe, I don't see anytime soon that Apache 2 will be "stable".

      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    2. Re:Yeah yeah yeah by ttfkam · · Score: 1
      First off, Apache 2 is stable. PHP -- the underlying libraries, but much the same from a user point of view -- on Apache 2 is not stable. That was another pet peave about the PHP page warning not to use Apache 2 in a production environment. The implication to someone who doesn't know the underlying architecture differences is that Apache 2 is faulty. It is not.
      The major feature that draws people to Apache2 is threading. On Windows where most basic libraries are, and must be, threadsafe, Apache2 does actually make sense and it would be good to work out the kinks on that platform.
      Has Windows only recently starting relying upon threads? No. Are 3rd party libraries on Windows threadsafe? Pretty much. Do the PHP developers recommend its use with Apache 2 on Windows? No. I recognize that Rasmus has mentioned this, but again Apache 2 has been out for two years, Windows has been out for much longer, and still PHP is "a production environment neither on Unix nor on Windows." They don't say why. No one puts this explanation on PHP's Apache 2 install page.

      Why doesn't mod_perl have this dire Apache 2 warning? Doesn't it use the same system libraries on Linux? What do the Perl folks know that the PHP folks don't? Is Perl any less a "glue language" than PHP?

      But rather than actually deal with the problem, they avoid it. I say the web page should state clearly that PHP may have problems with non-threadsafe libraries, and if you use Apache2 with mod_php4, support may be limited to documenting your hardware and software configuration. What does this accomplish? You get a better idea of what kills a setup, and you get more info (most important!) about what the underlying problem is.

      Not everyone reads the PHP mailing list archives.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    3. Re:Yeah yeah yeah by mcrbids · · Score: 1

      Someone wake me when Apache 2.0 support stabilizes for production use. Yes, that includes the database drivers and other support libraries. It's been two years since Apache 2.0 went stable. I mean c'mon.

      I figured that since Apache2.0 was an RPM on Fedora Core 1 that it was "stable". Boy, was that a mistake. I very quickly ran into a strange memory problem, where a php value passed via the httpd.conf would get passed randomly to other sites as well.

      Caused no end of grief, until I rpm -e the apache binaries and compiled from 1.3.x sources...

      I'll be moving slowly on this "upgrade"...

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    4. Re:Yeah yeah yeah by Anonymous Coward · · Score: 0

      > First off, Apache 2 is stable.

      It is not. I manage about 35 Apache 1.3 servers and two 2.x Apache servers. I spend more time managing the two 2.x servers than I do the 35 others! 2.x is so bad, it will bring Linux down with it. I just got back from the office to reboot one of them on a Saturday morning. 2.x isn't ready yet for production. Otherwise, why do you think 99+% of the people that run Apache are still using 1.3?

  14. PHP-GTK vs SVG, XUL? by 4of12 · · Score: 1

    I've long thought web browsers could use better interactive vector graphics, fancier widgets, etc.

    Does PHP-GTK provide this only on the server side?

    Does any of the functionality overlap with what could be provided using SVG, JavaScript and XForms (or even XUL)?

    --
    "Provided by the management for your protection."
    1. Re:PHP-GTK vs SVG, XUL? by Anonymous Coward · · Score: 0

      Read the FAQ. PHP-GTK can't be used for server-side scripts, but only for command-line scripts.

  15. PHP needs to depreciate incompatible modules by HighOrbit · · Score: 2, Insightful

    I agree with you that 2 years out is just too long to sit around waiting for a fix. From everything that I've read, its not the core of PHP that is incompatible with Apache 2 threading, but its the various misc modules. The PHP group needs to step up to the plate and make a hard decision. They should declare the incompatible modules depreciated and stop distributing them until they are fixed. That will be the only thing that motivates the module maintainers to get off their duffs and get the darn things fixed for good. No doubt that that kind of decision would cause lots of pain, wailing, and gnashing of teeth ; but sooner or later it has to be done. Now with the release of the PHP 5 series is as good as time as ever.

    Yeah, I know somebody will say "shut up and hack", but I don't think your average end users should have to become PHP subsystem hackers, especially on a project as large and important as PHP.

  16. C# by TPoise · · Score: 1

    Okay, just use C#/Mono and be done with it.

    1. Re:C# by DAldredge · · Score: 1

      Mono Sucks! So Does Perl!

  17. Re:etc by erlando · · Score: 1
    The new one is a lot more usable.
    Right.. That's the one without a way to input a filename without using the mouse. Really usable..
    --
    Remember, there are no stupid questions. But there are a lot of inquisitive idiots.
  18. How about they fork them... by Phil+John · · Score: 1

    ...fix them and be done with it. Either that, or stop whining, fix them and send the changes back to the maintainers as a patch?

    --
    I am NaN
    1. Re:How about they fork them... by Anonymous Coward · · Score: 0

      Find something with namespaces, a consistent API, and doesn't freak out when someone says "threads."

      ...and be done with it. No patch necessary.

  19. Wrong tool for the job? by noda132 · · Score: 1

    PHP was designed with websites in mind. I've googled and am unable to come up with an answer to a pretty basic question: does PHP5 even have a garbage collector?

    Python has mature GTK/GNOME bindings and a much more developer-friendly syntax than PHP. Not to mention, it takes virtually no time to learn the language.

    Why not use the right tool for the job?

    1. Re:Wrong tool for the job? by mcrbids · · Score: 1

      Python has mature GTK/GNOME bindings and a much more developer-friendly syntax than PHP. Not to mention, it takes virtually no time to learn the language.

      Why not use the right tool for the job?


      I did - using PHP-GTK. I have a rather large, distributed, server-based application. The client programs are written in PHP-GTK, and periodically sync up with the server. Everything is in PHP, so getting the clients and servers to communicate was not only easy, they use the exact same functions and API to communicate.

      This makes many types of compatability problems simply vanish. The project has grown and progressed smoothly and easily.

      A "Garbage collector" is simply irrelevant to PHP. Memory management is taken care of for you. Oh, and the PHP online docs are second to none, and the language is clean, simple, and well laid out. Rather than spend any more time doing pointless research, I'd suggest you download it, compile it, and give it a whirl.

      I did, and I'm not looking back!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    2. Re:Wrong tool for the job? by noda132 · · Score: 1

      A "Garbage collector" is simply irrelevant to PHP. Memory management is taken care of for you.

      That was my question. Memory management is taken care of when PHP is run as a server in a simplistic way: it allocates memory as it needs it, and then deallocates everything when the process is complete. When PHP is run as a memory-resident application, it needs to be able to keep track of which variables are no longer referenced so that it can free up their memory; otherwise it will keep growing and growing in memory size until it runs out. The logic which frees memory as the program is running is the garbage collector; without it, applications just aren't reliable enough to use in any but the most simple scenarios.

    3. Re:Wrong tool for the job? by Anonymous Coward · · Score: 0

      I beleive you are mistaken. PHP5 keeps track of the number of references to any object in memory. When the object is no longer referenced by other variables, the deconstructor is called and the memory is deallocated. This was explained at http://www.php.net/zend-engine-2.php however, the only link to this document was from the PHP.net homepage, and the article containing this link has been replaced by newer articles.

      I can't say if PHP handles other variable types this way, presumably PHP internal "resources" are. However it is unclear how garbage collection is handled for strings, numbers, arrays, etc (I assume the same mechanism is used).

  20. Apache is now part of a Sun/Java family by konmaskisin · · Score: 1

    Apache project's priorities largely focus on java. If you can get perl cgi's or php to run, fine, but Apache is being designed with java in mind (check the project list at www.apache.org - it's java java java.

    The PHP group should just write its own minimal web server designed exclusively to run PHP so that PHP can run "standalone" without Apache.

    1. Re:Apache is now part of a Sun/Java family by Anonymous Coward · · Score: 0

      And this would be better than using Apache 1.3.x how? Faster PHP development? Hmmm... No. Faster web server? Hmmm... Probably not. Waste of time and a really fucking stupid idea? Hmmm... Absolutely!

  21. Re:etc by konmaskisin · · Score: 1

    Try Ctrl-L

  22. Re:etc by erlando · · Score: 1
    That's another dialog altogether so..: Not good enough. I simply cannot see the motivation for removing a textbox from this particular dialog.

    Aestetics? In that case I call BS!

    --
    Remember, there are no stupid questions. But there are a lot of inquisitive idiots.
  23. Damn Right!!! by DAldredge · · Score: 1

    You know if you are going to point out a list, perhaps, just maybe, you should read the damn thing first.

    http://perl.apache.org/

    mod_perl gives you a persistent Perl interpreter embedded in your web server. This lets you avoid the overhead of starting an external interpreter and avoids the penalty of Perl start-up time, giving you super-fast dynamic content.

    As you'd expect from the Perl community, there are hundreds of modules written for mod_perl, everything from persistent database connections, to templating sytems, to complete XML content delivery systems. Web sites like Slashdot and Wired Magazine use mod_perl.

    mod_perl is an Apache Software Foundation project. It is licensed under the Apache Software License.

    1. Re:Damn Right!!! by ttfkam · · Score: 1

      And apparently the Perl folks can get a working model running with Apache 2 even though they're using the same underlying libraries as PHP. Hmmm...

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
  24. Let me get this straight by ttfkam · · Score: 1

    You're using a threading web server with PHP, a scripting environment whose underlying libraries are NOT threadsafe, and you are running into random problems.

    What a coincidence!

    Did you try the prefork MPM or did you just assume Apache was to blame?

    --

    - I don't need to go outside, my CRT tan'll do me just fine.