Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
PHP Programming

Announcing PHP-GTK 141

whyDNA? sends us this news bit: "I found this on the PHP page: The first release of PHP-GTK is now available. PHP-GTK is a PHP extension that provides an object-oriented interface to GTK+ toolkit and enables you to write client-side cross-platform GUI applications. For more information, visit gtk.php.net."
This discussion has been archived. No new comments can be posted.

Announcing PHP-GTK

Comments Filter:
  • by Anonymous Coward
    I agree with your first comment. Outside of browser applets, my view on Java is: "what's the point?". Especially for server-side stuff...

    But, PHP is interpreted, too. There's nothing necessarily wrong with interpreted languages, particularly for DB-based apps where the SQL engine and queries are the bottleneck. For small apps or for rapid development, interps allow for fast code-then-run loops. May not be an adequate method for kernel coding, but for gotta-be-done-yesterday business apps it makes a difference. Also, I believe both PHP and Java have caching products that will speed them up once development is over and you need more performance.

    Of course, I believe the original poster misunderstood the point of the story... PHP-GTK is not intended to run in a web browser. This is intended for local apps using the php command-line interpreter to quickly create GUI apps, similar to Perl-Gtk, Python-Gtk, etc...
  • PHP is barely capable of web scripting. Just because you can mount GTK on it, doesn't make it Perl, or Python.

    As a programming language, it sucks just a little bit less than quick basic.

    Man - what those dumbo PHP programers can do if they ever learned to program...

  • My personal solution is to go ahead and use PHP, but not bother with the separate Zend Optimizer download.

    Then you're missing out on the rather good speed increases you'll get from your code.

    I guess it's everybody's choice .. seems rather like cutting your nose off to spite your face though.

    People are so hung up on the 'free software' bandwagon they don't stop to think and realize that all this stuff is freely downloadable and usable anyway.

  • Could that be because PHP is really just a 'toy' language.

    With php I've developed two full-bore web application that were each 20-30k lines of code with about another 10-20k lines of support code. Php scaled extremely well for those apps and I've since passed the first 30k project off to another coder(who learned the language in a couple weeks). My apps are also the fastest things on the market, linux + php + mysql + apache just screams.

    But then I also use perl, about 5k-10k worth of system level support code. I use perl's reg expressions to crunch data into my databases, to automate maintenance and push/pull information and files across multiple servers.

    You can either sit around bemoaning how your language is the "best" language and code just in that, or you can use multiple languages, code to their strengths and go home from work early each day.
  • If you can say this then you don't know Perl...
    let alone Obect Oriented programmer.

    Tell me great guru of Bullshit.... how do you do multiple inheritance with PHP - let alone simple references.

  • Right

    Which is why you should never use PHP. It scales like crap, is fundementally flawed in it's data typing, lacks serious modularity or OO-design.

    You waste more time debugging it than anything else, and it's error messaging system is useless.

    Use PHP - and spend weeks fixing what would take moments in Perl..
  • by Angst Badger ( 8636 ) on Friday March 02, 2001 @07:38AM (#389912)
    One of the greatest things about PHP is that it is easy for people with little/no programming skills to pick up and create web applications. To push it to a full fledged language defeats the purpose, in my opinion.

    It's called "room for growth". It's not a bad thing. Otherwise, all those people who learned PHP will discover that they wasted their time when they run into the limits of the language.

    We try to push everything (languages, OS's, apps) to try to be everything to everyone. PHP is great for what it is. If you want to create a GUI, use something that was built for it the ground up for it.

    Oh, piff! With the exception of Visual Basic and kindred proprietary RAD languages, there are no significant languages out there that were "designed from the ground up" for GUIs. (Java is arguable, but still...) I'm not even sure what it would mean for a language to be designed for GUIs, or how it would differ from any existing procedural or OO language. Make window a reserved word? Whatever.

    The fact of the matter is that most GUI API's are grotesquely complex and present a steep learning curve for a beginner or someone who just wants to write a simple graphical frontend for a tool. Tcl/Tk has heretofore been the only exception worthy of note, but Tcl has its own host of problems including limited compatibility between versions and its DOS-batch-language-gone-wild syntax. Python is probably a better language (than PHP or Tcl), but PHP has the advantage of presenting a gentler learning curve for anyone who already knows C, minus all of the implicit syntax that makes Perl so difficult for newbies.

    If you want to create an interactive database driven website (and you don't know perl) use PHP.

    PHP is a lot easier to use than mod_perl or Mason for lightweight tasks. I use all of the above, and only use Perl when the situation is sufficiently complex to call for it. It's also a helluva lot easier to configure.

    I hope this doesn't ever work itself into the main distribution of PHP... More bloat.

    Consider learning to edit your makefiles if it ever does. A Gtk extension to PHP would only be appropriate to the standalone build, not the Apache module.


  • Don't forget 'enables' -- yet another buzzword.

  • Now, I'm not supporting Microsoft on it, but I haven't seen a better implementation of Java support yet.

    Not even Sun's J2SE? What about IBM's extremely fast recompiler? I guess you haven't seen them because you aren't looking.

    "Like any trademark, Java is an adjective."
    All your hallucinogen [pineight.com] are belong to us.
  • I'm not talking about how it affects server operation. I'm wondering why you would want to use PHP with the GTK+ extensions to write a GUI app. Much like Perl/Tk, it's proabably great for a quick input dialog box, but certainly not applications.
  • GTK has been written for Win32 systems, but, ironically, not for the older Macintosh systems. Since MacOS X is BSD, which, believe it or not, is Linux, GTK should work with few problems as is on the new MacOS X.
    Furthermore, there are Windows libraries, mostly dynamic link, that will allow on-system support for the 9x series, and NT supports it from 2k^.
    I mention that as I'll remind you, when you programme using GTK, or should that be if, the language formats available are for cross-platform. As there is primary C++ for ICE systems, or as you call them, *nix, there is Qt for Windows and Mac.
    Now, personally, I like Java, but have you noticed how long it takes for Star Office or Netscape to load? And these are already in binary format. PHP, as it stands, takes slightly less time to do more complex things, and it's in run-interpretation non-compiled form. Now that it can be turned into machine code, I'm sure the limits on its power will disappear like the validity of your argument.
    Now that that's out of the way, who's up for volleyball!?
  • I instinctively block all Baldwin appearances

    Did he ever live up to his statement("I'll leave the U.S. if GWB becomes President"). Man, someone should have made him eat his words. ;)

  • It'd be possible to fix the icon with a GTK+-based (but not PHP) paint program called GIMP [gimp.org]. It even runs on Windows. [gimp.org]
    All your hallucinogen [pineight.com] are belong to us.
  • What language used to own it?

    In a sense, HTML used to "own" PHP just as it effectively owns EcmaScript [www.ecma.ch]. Go to OSDN SourceForge [sourceforge.net] and follow any of the Show Source links at the bottom of the pages.

    All your hallucinogen [pineight.com] are belong to us.
  • It's a relitively well/cleanly designed modern GUI toolkit that is licenced under the LGPL, and supported by a zillion programming languages. There's nothing terribly wonderful about it, but it's the most-free GUI toolkit if you want your app to look/feel reasonably modern.

    All of the other GUI toolkits avalible eithor A.) Are less free, B.) Are less modern, C.) Are less powerful, or D.) Are supported by less languages.

  • by Anonymous Coward
    That has got to be the yoogliest /. icon in the whole bunch!
  • by Anonymous Coward
    I really didn't see that coming. PHP is really cool and, due to the existence of a binary executable, can be used for shell scripting. But a GTK-Binding for PHP is indeed a very nice idea. (Moderate down any troll that says it's bad; if they don't like it, they just shouldn't use it).

    I'm thinking that in a short while we'll see bash bindings to GTK or something. :-)

  • I'm pretty sure you're getting this totally wrong.

    This is nothing to do with using PHP in web pages at all. In fact, it's nothing to do with web pages.

    This about using PHP as a script interpreter, just like you use perl or python as a script interpreter.

    So this certainly won't allow you to embed GTK applications in web pages: that would be neat, but would require a browser-plugin at the client end, and require the PHP code to be send to the client end. So the client would need the PHP interpreter.

    It won't allow you to embed gtkhtml in IE, either ;-)

  • well, disclaimer IANALP (I am not a Linux programmer). I'll tell you one use for it. Most of our C++ coders in our Microsoft shop use VB for playing around with a new library/version/whatever. They prototype functions in VB then bounce them to C++ later. Or maybe they decide that, performance isn't a key issue in this COM object (like it's dependent on database access or other disk access for speed) and can just as easily stay in VB without a performance penalty and hand off the object (usually with an interface defined) to one of the VB programmers like me :) Just thought I'd give you the view from the other side :)
  • by Anonymous Coward
    Well, you can write little apps and distribute them with 3 CDs - one for apache, one for php and one for mysql. Once all that is installed and mastered, you can "Click here!" to display the sqare root of 2, or something.
  • I guess it's everybody's choice .. seems rather like cutting your nose off to spite your face though.

    (Don't tell anybody, but to be honest, it's been more a matter of feeling too lazy to download it and mess with it than a licensing issue. Quite frankly, I don't have a huge problem with the QPL, as much as I'd prefer to see it GPL'd. I just haven't felt that my code was running too slow at the moment...)

    Wait a minute...did I just say "don't tell anybody" in the middle of a public slashdot post? Must be getting late. Can I go home yet? :-)

    "They have strategic air commands, nuclear submarines, and John Wayne. We have this"
  • Someone else mentioned it already, but there already exists an ActiveX control which allows you to embed Mozilla within IE (or anything with ActiveX support). Go here: http://www.iol.ie/~locka/mozilla/mozilla.htm [www.iol.ie]. I can't find anything about it, but if Mozilla can use ActiveX/COM/whatever controls with the <object> tag, you could go the other way and embed IE within Mozilla. ;)
  • Cliff has marked me as troll, and by gum-golly if someone thinks they can just have that title on a silver platter.
  • How's that?

    A variable has:

    A.) A known trustable value because you assigned to it yourself.

    B.) A known trustable value because PHP automagically asigns something reliable to it.


    C.) A known untrustworthy value, because it it could have been modified by the user.

    I miss how this is any more problematic than say CGI.pm in perl.

  • And Rob didn't select it.
    And, personally, I don't care much for the nut. The PHP icon is important. It means...well, it's just nifty, and I stole for use on another site, so :P
  • If so, I already yelled at you. If not, well...FOOEY ON YOU!

    Hey, here's a thought, why not run a "Make the Best Widgets for Slashdot" Campaign?
    Winner enters the circle of advanced moderators, and gets Rob's autograph on any shirt from Think Geek.
  • I totally agree. I've used c++, and while I like both of them, PHP kicks butt when it comes to web-based projects - mainly because you don't have to deal with all of the overhead associated with a strongly-typed language. There's no reason the same level of abstraction that makes PHP easy to work with cannot be applied to other uses. I just hope the speed is there.
  • So as I understand it then, you are free to choose either license?

    That makes sense.. I thought the previous poster was implying that both licenses had to be satisfied.. which is counter to GPL.

    Then again, as the compelte copyright holder, they can release it under whatever bizarre licenses they want, it just might mean nobody's technically allowed to use it.
  • by AppyPappy ( 64817 ) on Friday March 02, 2001 @04:17AM (#389934)
    Looks like PHP is looking to become a "real" language. Good to see. Our library folks wrote a time-card entry system using swipe cards with PHP and didn't know squat about the language when the wrote it. It's a great language for beginners and experts alike
  • So as I understand it then, you are free to choose either license?

    Precisely. The GPL prevents people from using Qt in projects that have NDA/propritary tech issues. That's a fact, even if you think that propritary tech is a Bad Thing.

    A good example is the Realaudio player, which uses Qt under the QPL. Real, for whatever reason, does not want to release source, so they have to pay and purchase Qt under the QPL. If they want to play by commercial rules, they have to pay by commercial rules.

    noatun [derkarl.org], on the other hand, is GPL. As such, they use the exact same code[1] as Real, but they get it for free and their code must be Free (distributed under GPL). If they want to play by Free Software rules, they have to play by Free Software rules. :) (Well, they don't have to PAY).

    [1] Just to clarify, TrollTech does have other products, some of which run on top of Qt, which they sell as Qt Professional or Qt Enterprise. For instance, Enterprise has a portable networking module. In many cases, the features (like the networking module) are available in the equivelent KDE libraries (like kio) under the GPL. Not the /same/ code, just providing the same functionality.


  • GTK is a GUI toolkit for The X Window System (also ported to Win32 I believe). The homepage is gtk.org [gtk.org]

  • We get the point, you don't need to keep posting.

    .oO(Fluff for brains, I swear)

  • Hmm this sounds pretty cool but how about this for an idea: most organisers (palm, psion, wince etc al) all run pretty lightweight programs (text editors, small database and organiser functions). Now it might just be me but php apps can do most all of these pretty well, and with a few addons (something like cron, and an alarm addon) could do most everything. PHP is pretty small, uses little processor speed and is pretty damn easy to pick up. The 'net browser can be used as an interface (what organiser doesn't have a browser nowdays? apart from the rex). I dunno but it seems like a good idea to me.
  • ...or COBOL-GTK? Or .bat-GTK?
  • What? Qt is the Trolltech widget set and is available under the GPL for non-commercial development. And what has OO got to do with the quality of the language? Somebody mod this down as -2 (Dumbass)
  • I'm not sure if gtkhtml was written from scratch or based on the KDE alternative but I'm pretty sure it isn't based on Gecko (the Mozilla engine). It's more meant as a lightweight alternative I believe.
  • My personal preference is for PostgreSQL, but that's more because it's what I used first (no, I don't want a flamewar between mysql/PostgreSQL/whatever; it's been done to death already).

    However, there's still a lot you can do very easily with PHP and a DB backend, whether it's Oracle, PostgreSQL or MySQL. We've got stuff like a web-based coursework submissions system I hacked together using PHP and Postgres. PHP is a damn good language and very easy to learn if you've had any exposure to perl; a lot of the syntax and usage is similar, even easier under PHP.

  • Great post Ananova.

    I just started using PHP in January. It was easy to learn and does lots of stuff. I used a small PHP script to change a 50,000 row database from fixed width columns to tab deliminated (so I could import it into mySQL (I couldn't find a way to import it straight into mySQL), then used PHP to output the data from the database to the web pages.

    I found a free PHP IDE at PHPEd [soysal.com]. It only runs on Windows, has syntax highlighting, and lets you run and debug the programs you're writing right in the editor. I like it pretty much.

  • Not meaning to sound to condescending (yeah right), if you're going to put my team down please spell it correctly. It's LEEDS!!!! Sorry if the words used in this post contain too many syllables for you.

    Now back to the topic.

    P.S. The goal should have been allowed.
  • Wow, is this a troll or an idiot (or both), we'll give him the benefit of the doubt and just call him an idiot. Are you one of those people that praise Gnome and curse KDE (or vice versa). They are both good a different things.

    Since PHP is much more common than mod_perl, it's easy for people to write embedded pages, rather than use a slow perl CGI.

    Nobody said this was the Perl killer, or even said that it was better than Perl/TK.
  • Only Americans are stupid enough to use PHP, eh? That's funny, I know more European PHP users than American ones. Not to mention how many members of the PHP Group are European.

    And [php-kongress.de] then [phpwizard.net] of [kill-9.dk] course [phpfacile.com], there's [phpfrance.com] the [php-resource.de] proliferation [troebsfamily.de] of [ilovephp.com] PHP [phpinfo.net] sites [phpindex.com] in [phpwelt.de] Europe [php-center.de].
  • whats wrong with PHP going general use if you could use it for other stuff then use it for other stuff
    i cant see what wrong that could do
    ....im maybe wrong but i dont think the internet was intended to gameplaying.................
  • Available at phpgtk.com
  • I'm a 17 year old student. I used to be fairly afraid of programming. But PHP is simple enough for a programmer to get good at. Once I learned PHP well enough, and became comfortable with it, I viewed programming in a new light. And with this GTK extension, there is little you can't do with PHP. I like it.
  • Didn't someone create a DCOM/ActiveX/whatever Gecko component? If so, couldn't a person have IE use that for displaying HTML instead of it's original component?

  • It will not make it into the main PHP distribution. That's why I set it up as a separate CVS module and with a separate webpage and release schedule.
  • I made a object class in PHP for console interaction on UNIX type systems, it could get /dev/stdin stdout, parse it and you could have input and output! I was working on having it recoize the mouse, but I lost interest. it was a fun project, some of it is still on www.phpbuilder.net
  • PHP Coder [phpide.de] is an PHP IDE written for Microsoft platforms by a German High School student. Of course, he does state that he spent a year in the United States ...
  • vb2c check it out, it's kinda nifty *search your local www.freshmeat.net repository*
  • ...the PHP Slashdot logo is damn ugly, and looks like a brand tag you'd find on clothes made by 6 year-old Malaysians.
  • Perhaps if you don't consider the performance hit. From all of the figures I've seen, PHP is much faster than perl. Especially on websites. Mod_Perl does speed things up by a HUGE margin, but unfortunatly my company does not allow webservers other than Netscape/iPlanet Enterprise... so we must run our perl script CGIs the old fashioned slow way. If you know of any way around this, it would be of help! We do like perl!
  • What a troll. It would help if you'd at least spell Perl correctly. And I know of lots of PHP users in Europe. In fact, I'd never ever consider allowing anyone to use Perl for serious web development on projects I'm responsibility for, but PHP would be another matter.

    However choosing either language depends on what experience you have available in your organization, and on personal preference much more than on the languages themselves.

    And the main reason it might be easier to get Perl developers is because Perl is much older. PHP, on the other hand, is catching up fast.

    And to many C/C++ developers like me, PHP is a lot more familiar and easy to learn, and a lot less irritating, than Perl.

  • And while you're at it, replace the Silicon Graphics cube logo with the new "sgi" logo. Sure, the cube logo was cooler, but it's long gone these days.
  • Yes that is what I want to do use perl, my god man it just lends it self to such nice readability. Yea Right!
  • by mholve ( 1101 )
    Talk about trying to go for too much. Do we need another language? Sure, if it fills a need. Should we make PHP into it's own language? I think that'd be overkill, adding complexity and fluff where none is needed...
  • If you know of any way around this, it would be of help!

    Your company does not allow ??? What kind of anti-technical BS is this ? Surely your company is interested in the most cost-effective appropriate solution for the job. Unless you work for one of those huge corporations that requires 'standards' above all else, even at the expense of profitability.

    The best thing to do here (Apart from changing jobs) is to simply bypass the stupidity. Set up apache on a separate machine. Have the 'front door' running on netscape, but redirect to the performant solution on apache with mod_perl at the earliest opportunity.

    I had the misfortune to work for a place that banned mod_perl. Unfortunately, they 'just didn't get it' (tm) so I had to take my services elsewhere. Remember, its a sellers market for tech skills, even now after the dotcom slump...

  • One interesting thing you could do would be to use the gtkhtml widget which I believe is based on mozilla.Thus you could open a mozilla browser from within IE.

    No you couldn't. This is about using PHP to control a GTK application front end (all on the one machine), it has nothing to do with website features.

    DILBERT: But what about my poem?
  • Yeah, thats why all the copyright notices don't meantion KDE...
  • Don't get me wrong, I love PHP - I wrote "BlackNova Traders [blacknova.net]" using PHP and MySQL... and the language rocks for web programming... but that was its intended use.

    I don't want to see PHP lose its focus and purpose - it isn't a general use language... if you want one, there are plenty (C/C++, perl, and even java for example). PHP is meant for dynamic kick-ass web-page creation.
  • Glad /. fixed the image for PHP.

    And in order to not get modded down, I just have to say that this is not necessarily a Good Thing(tm), but certainly not a Bad Thing(tm). How could the world be hurt by the introduction of another alternative?

    Worst case scenario is that it never gets used, nobody paid money for the install, and the PHP gang gets back to web-based stuff. The world would be no worse off than if this was never tried in the first place.

    I just don't see why people are complaining about this! It's not like you're going to have to use it, even if it is successful!

  • You're right, of course, about Perl not having been developed from the ground up for db-driven websites... But then again, if I wanted to pick nits, I could say neither was PHP (at least not the first time around)... It was designed to be used in Personal Home Pages, for counters and stuff...

    Of course, later, they did redesign it from the ground up, and decide to make PHP stand for something different and much more impressive-sounding, but still... I guess my point is that few languages were designed to do terribly specific things from the ground up, because to do so limits their usefulness as a programming language to specific areas. Rewrites happen when focus is deemed necessary. PHP has had one, and I'm sure Perl will too with version 6.0.

    To paraphrase the Apple Jacks commercial: Use what you like! :)
    NeoMail - Webmail that doesn't suck... as much.
  • Perl is most often used in web sites, so I guess HTML owns Perl.

    I've made CGIs in C before. I guess HTML owns C.

    My point was that PHP is a C like scripting language that has no dependence on a web server whatsoever. The perception that it's like JavaScript or that it's not a "real" language is ridiculous. I've written non-web scripts in PHP before. This is no different than GTKPerl or PyGTK or the original C-based GTK.

    Well, it is different from GTKPerl in that the language is better suited for large graphical applications, especially to a C developer. I'm not trashing Perl here, it's just the way the languages were designed.
  • <rant>
    PHP doesn't loose its focus when it thinks outside the web platform, it increases its usefulness, and broadens its reach. Not only that, it puts itself on par with things like Java, and opens doors that will allow it to change as the web changes. Don't fool yourself for a minute that the web (as it exists now) will be around in 10 years. PHP is showing that languages too can evolve, just as technology has, is, and will continue to do.

    I commend the open source community for driving this change and helping to make the future brighter for all.

  • Perl's strong typing? Bwahahaha!
  • by gyp ( 312559 ) on Friday March 02, 2001 @05:05AM (#389971)
    One of the greatest things about PHP is that it is easy for people with little/no programming skills to pick up and create web applications. To push it to a full fledged language defeats the purpose, in my opinion.

    We try to push everything (languages, OS's, apps) to try to be everything to everyone. PHP is great for what it is. If you want to create a GUI, use something that was built for it the ground up for it. If you want to create an interactive database driven website (and you don't know perl) use PHP.

    I hope this doesn't ever work itself into the main distribution of PHP... More bloat. My webserver doesn't like it already...


  • No way, the original SGI logo -is- way kewler.
  • "An icon so bold, so blatantly thrown together at the last minute that you have to wonder, 'What was Taco thinking when he put this together?'"

    Not exactly a strong testament to Gimp (although it's more the artist's fault).

  • C'mon.. GTK+ is cool and all for being a nice cross platform (well, at least cross-*nix), but Java is a nice tool thats already there for the major browsers.

    I'm reasonably sure you're looking at this all wrong. I don't think this is related to web browsing at all. I think it's just a means of letting you use GTK+ from *any* PHP script. That would place it in the same class as dtksh, tcl/tk, tkperl, or tkpython.

  • Uh, there was a commercial FastCGI module available for the Netscape servers. Does the same thing most people use mod_perl for: it allows slightly-modified CGI code to be compiled and cached by a persistent Perl interpreter.

    The only problem is that it was sold to another company, which was in turn acquired, and it was taken off the market. You may want to contact Adero [adero.com] to see if they'd be so kind as to point you in the right direction.

    If you're running the Netscape/iPlanet webserver on NT or Win2K, you can also use ActiveState's PerlEx, which is another similar persistent-Perl engine.

    There also appears to be a reasonably modern Perl NSAPI module, which is philosophically the closest thing to mod_perl in that it lets you get close to the metal and write true server modules in Perl. It's here. [canoe.ca]

    Velocigen [velocigen.com], another commercial product, isn't exclusively a Perl engine. It's a logic and content caching engine that uses XML tags that can hook to cached and embedded code--including Perl. It's probably a different development experience from these other systems, but if persistent Perl is your goal, this should do it too.

    Ever tried searching the Web?
  • by Pinball Wizard ( 161942 ) on Friday March 02, 2001 @10:12AM (#389982) Homepage Journal
    This is interesting. Just yesterday our beloved Shoeboy [slashdot.org] was commenting [slashdot.org] on how Linux needed a VB like language to quickly assemble quick apps.

    Would this fit the bill? Being that I can almost directly translate PHP to ASP and vice versa, and that ASP is the web language descendent of VB, does this mean we now have a VB for Linux? If so, cool!

  • if this is what it says, gtk bindings to php -- so you can write desktop apps in gtk using the php scripts hitting a database...that's awfully cool.

    reminds me of oractcl...it would be nice to have some SCREENSHOTS of the thing doind financial stuff.

    after all, i don't think the road to world domination is paved with games and 3d...it appears to flow from corporate use.

    show it doing corporate things, damn it!!!

  • because it includes a BSD-like advertising clause.

    Basically, it looks like it's "free but not GPL". (Personally, I don't have a philosophical problem with the "give us credit if you use our code" clause of the license, but that's me.)

    The Zend Optimizer (which is optional, and a separate but related product, isn't it?) apparently uses the QPL according to the Gnu page mentioned above, which is the license that used to be used by QT and got the flamewars about the "freeness" of KDE going, wasn't it?

    My personal solution is to go ahead and use PHP, but not bother with the separate Zend Optimizer download.

    "They have strategic air commands, nuclear submarines, and John Wayne. We have this"
  • How can something be availableu nder the GPL for non-commercial development. the GPL forbids such restrictions.
  • I can't code Perl nor PHP, but I DO now that there's no need te start insulting people over this.

    And if you do want to start insulting, please only speak for yourself. I'm European and I don't want American PHP coders to think I find them stupid.

    (I could go on and on about how the Internet should be international and free from any regional prejudices, but i won't, i'm pretty sure everybody but you gets that)

  • by LetterJ ( 3524 ) <j@wynia.org> on Friday March 02, 2001 @06:03AM (#389995) Homepage
    I'm the author of PHPTriad and would like to point out that I've got a testing version of PHPTriad 2.0 available which I consider much more stable and complete than the version that download.com is pointing to. It's linked from a news story on www.phpgeek.com [phpgeek.com].

    Head Geek
  • www.php.net

    and you can look at www.phpbuilder.com too for tutorials
  • Personally, I love (in the platonic sense, you sickos!...) PHP. I'm looking forward to playing with this new stuff.

    Just a few random comments/opinions on some issues that have come up here:

    The "but it's not GPL!" issue seems to revolve around two things. One is that there is a clause in the license for PHP that says, to paraphrase, "if you use any of our code for something else, give us credit". This is apparently GPL-incompatible, but I don't personally have a moral problem with this. The other licensing issue is the Zend stuff, which when dealt with separate from PHP is under a different, more restrictive license (the "Zend Optimizer" which if I remember right is a separate product, is under the much-maligned QPL, apparently.

    I tend to think of PHP as "PERL-lite". It's not as big or "full-featured" as PERL is, and is therefore of more limited (but more focused!) use. PHP does have what to me seems to be a very PERL-like syntax, though. Perhaps one might think of PHP as "Programming marijuana" which leads to escalation to Harder programming languages like PERL* :-). Like PERL, PHP can be worked with in either Object Oriented or standard Procedural ways (or a combination thereof), and both are similar (though I must admit I'm still slightly baffled on PERL OO - PHP doesn't use anything like bless(), for example...)

    It LOOKS like "PHP-gtk" and the standard PHP will be separate projects, which is probably good, as it should keep bloat down while allowing each project to borrow relevant improvements from each other.

    Mind you, I think the "bloat" issue is mostly nonexistent. The Linux Kernel itself might be considered extremely bloated...except that running "make config" "de-bloatifies" it by setting up to only compile what you need or want. PHP will almost certainly remain the same way.

    Maybe now somebody will come up with a "flash authoring" tool for Linux using PHP's swf support [php.net] (I've been wanting to "dabble" with flash animation, but I don't know of any linux tools for putting them together...)

    (* - It's a joke! Really! No, I'm NOT trying to start a "war on drugs" flamewar!)
    "They have strategic air commands, nuclear submarines, and John Wayne. We have this"
  • www.php.net (and download the manual... its my bible)

    also www.devshed.com :)
  • Or .bat-GTK?

    Hey, cool! What better language to write a GUI version of EDLIN in that we've all been wanting for so long? :-)

    "They have strategic air commands, nuclear submarines, and John Wayne. We have this"
  • ... an icon so completely just copied off the PHP page...

    - - - - -
  • Should we make PHP into it's own language?

    What do you mean? What language used to own it? I don't understand...

    I'm a PHP guy, though I've been preferring Python lately. I still really like PHP.

  • Use this one [rug.ac.be]. It's the same as the one you're useing but anti-aliased especially for you.
  • how is this a troll? someone compares java to php, i point out the stengths versus weaknesses, and BAM it's a troll.
  • If you want to create an interactive database driven website (and you don't know perl) use PHP.

    Wow, methinks we have a troll here.

    For the record, I know Perl and PHP.

    If you want to do a large project, using an OOP implementation that isn't fscked and a language that is actually readable, use PHP.

    Actually, it's Perl that didn't stay focused. It was meant for more powerful shell scripts. Now people are writing web sites, email clients, MAME frontends, etc...

    PHP originally was meant for web sites, but it was designed to be C-like for a reason. I, the other day, was wondering why nobody had written bindings.

  • Pearl would be much better suited for this type of application, due to its strong typing and oo-features.

    I didn't know there was a strongly typed language called Pearl. Is it anything like the weakly typed language called Perl?

  • Those words are computer jargon, but I wouldn't call them buzzwords.
  • How can something be availableu nder the GPL for non-commercial development. the GPL forbids such restrictions.

    Qt, like many other very common packages like Ghostscript[1] is available under two licenses. The Qt code is identical, but the GPL version can only be used to develop GPLed applications (duh, that's the point of the GPL). The QPL version gives you the source without the restrictions of the GPL, so people can write Windows, Mac or Linux apps that can be distributed under their choice of license (including traditional commercial licenses).

    So, yes it is dual licensed, GPL for Free Software purists, and QPL for Open Source purists. I really can't think of another company that has gone to greater lengths to satisfy the community and has gotten a worse rep for licenses.

    [1] Of course, Ghostview releases the source under GPL a few versions behind the commerically available version. Qt's source is up to date on both sides of the license.


  • by AugstWest ( 79042 ) on Friday March 02, 2001 @04:33AM (#390020)
    Have you ever written a GUI in Java? Swing is still a horrible pile of crap.

    The GTK toolkit for Windows is rather stable in my experience. I've used it with an IDE and for some MySQL tools on nt4 and 2000. It isn't yet used very often, but that doesn't mean that a) it doesn't exist or b) it isn't stable.

    I think this is great news. I've been dealing with signed Java applets for years now, and they're a needlessly difficult thing.
  • by Diclophis ( 203740 ) on Friday March 02, 2001 @04:33AM (#390022) Homepage
    Well since its php related, I setup a mirror incase of any slashdot like effect. This seems really useful. the mirror is locate here:http://dev.sig.mine.nu/~jbardin/php-gtk-0.0.1 .tar.gz [sig.mine.nu]. I hope this helps.

    behold the power of SiG [sig.mine.nu].
  • by AugstWest ( 79042 ) on Friday March 02, 2001 @04:35AM (#390025)
    Yeah, seriously, I mean... this license ISN'T THE GPL. Somebody get a rope. [/sarcasm]

    Why is OO the holy grail? Why does everything have to be done by the GPL? Why must everything that comes out fit into the little box that you find acceptable?

  • Oh good grief. What were they thinking when they named it?

  • There are times when a dynamic web site needs to do stuff in the background, or on a regular schedule, or without worrying about a browser timeout, independent of whether the site is being accessed.

    For example, on an auction site you might want to have a script that runs once every minute to close out auctions that just ended, and email announcements to the seller and highest bidder.

    Or you might want to update the weather forecast on your home page every hour by downloading a page from National Weather Service, parsing it, and inserting the info into a database.

    Running PHP shell scripts from cron is great for that sort of thing. It allows one to develop the whole site in the same language, instead of switching to Perl or bash for the background stuff.

    Not that any of this has anything to do with PHP-GTK...

  • Go to your php source directory. Do ls ext/. Look at all of it and think, "Gee, look at all these extensions which I can choose to compile into my php binary, leave out alltogether, or build as shared modules." PHP will never be any more bloated than you want it to be because almost everything outside of the core language and server interfaces are modules.

  • It's not incorperated, it's an add on dynamically loaded module. Geez, it's a simple concept really... And even if the php folks rolled it into the dev tree, as long as you don't compile with --enable-gtk, who the hell cares if it's there or not? It won't affect your server, you can just pretend it doesn't exist.
  • by bobv-pillars-net ( 97943 ) <bobvin@pillars.net> on Friday March 02, 2001 @07:23AM (#390039) Homepage Journal
    According to Gnu, [gnu.org] the license [php.net] for PHP Version 4 [php.net] is not GPL-compatible [gnu.org] because it includes a BSD-like advertising clause [gnu.org]. For this reason, GNU recommends that free software developers write for PHP version 3 [php.net] instead, because it is also licensed under the GPL [gnu.org].

    Apparently, PHP-GTK [php.net] gets by with linking to version 4 because GTK [gtk.org] is released under the LGPL. [gnu.org]

    I'm surprised Richard Stallman [stallman.org] hasn't released a blistering condemnation of the project yet.

  • It looks like GTK is becoming a "real" widget set. Good to see. Out GUI folks wrote a time-card entry system using drop-down menus with GTK and didn't know squat about the widgets that they used. It's a great library for beginners and experts alike.

    I only wished that we had a way to use PHP with these GTK widgets... oh... nevermind.

  • One interesting thing you could do would be to use the gtkhtml widget which I believe is based on mozilla.

    Thus you could open a mozilla browser from within IE.

  • by Ananova ( 255600 ) on Friday March 02, 2001 @04:39AM (#390044)

    www.php.net/manual [php.net]. The manual is great. You can learn everything you need to know about specific things from there. Before that, you need a basic tutorial.

    A PHP page looks like this:

    <form action=<?php print $PHP_SELF; ?>
    <input name=message>
    <input type=submit>
    print $message;

    Try that. Also, to get hold of PHP, use PHP Triad [cnet.com] (on Linux, you can probably install it from your distribution CD), a win32 installer of PHP, Apache and MySQL.


    PHP is HTML with the code embedded between blocks starting

    and ending

    within that you put your PHP code.

    For example:

    print "hello";
    would display hello - just like perl.

    Similarly, as in Perl, variables are preceded by $.


    print "I like $message";

    It's convenient - all form variables get put into variables of the same name:

    <form action=apage.php>
    <input name=thing>
    <input type=submit name=action value=Submit>

    would send apage.php two variables - $action='Submit'; and $thing= whatever you typed in there.

    You should investigate PHP's object-orientation functions too. Here's an example class [class omitted due to slashdot's lameness filter :-(], which should be pretty explanatory.

    Anyway, start here [php.net]; read here [phpbuilder.com] for more, as well as here [zend.com]. Also subscribe to the mailing list at php-general@lists.php.net for help from others.

Air is water with holes in it.