I realize that with the announcement of the PHP port there will probably be questions regarding this. So, instead of cluttering up the other forums I figured I would create a new board just for comments/questions regarding this.
Erm....Scream is WWWThreads people <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" /> . And seeing as how it's his program, I think it's him who's doing it. <img border="0" title="" alt="[Wink]" src="images/icons/wink.gif" /> Strange thing is, I actually wondered about the PHP version this morning, and then voila! he's already working on it. I know PHP is the latest and greatest thing, Scream, but what advantages can it give us over Perl, except for the fact that some people just want or only have PHP? (Which is very hard to believe in this day and age)
At this point I would hate to even take a guess on a timeline. Just keep watching the changelog. I'll post the url to the development site once I get a little further along.
LoneVVolf is correct. WWWThreads people is me;). Converting actually has been going pretty smooth, much faster than I had originally thought anyways. In a couple hours yesterday I got about 5 scripts ported over.
I'll admit that my knowledge in PHP is limited, but from what I can tell it is a pretty easy language to work with. The main benefit is that PHP is a server module, so unlike perl it doesn't have to fire up a seperate process to compile the script and execute it. So, speed is a big factor.
I'll probably have more opinions about it in the near future. And someone else might be able to give a better answer on the benefits.
Let me give you a good example of why it's good to use PHP..
The forum I use to run got so many hits that it crashed constantly.. It was mostly because sooo many instances of perl executing that my machine would slow way down and the db couldn't handle it etc..
PHP only has one instance, it runs from the server level.. So it keeps things speedy and crashes less on an active forum.. (That means 100 hits at once, doesn't cause perl to run 100 times on your server, executing the same file..)
Also I think PHP can keep a persistent connection to the db where as Perl can't (Maybe mod_perl?) which cuts down on all of the db activity..
I still think Perl is a lot more fun to develop in though.. Especially when you start doing OO stuff (adds some spice to the same old boring Perl stuff) =)
PHP has an apache module - mod_php. Perl has an apache module - mod_perl.
Neither require spawning external processes to byte compile the scripts. They are read in once at init, and you go.
The apache benchmarking tool has shown WWWThreads 4.4.1 capable of handline 100 page requests/second of wwwthreads.pl w/3 categories and 20 forums on a 360 Mhz Solaris 2.7 machine running apache 1.3.9 and mod_perl.
This can be scaled up fairly quickly using a seperate machine for the MySQL server from the web server and using a non DNS based load balancer.
Don't get me wrong, PHP has it uses. I looked at using a number of PHP boards before settling on WWWthreads last year. WWWThreads was by far the superior solution. It had the richest feature set provided and the cleanest UI PLUS its backed by MySQL. For the life of me I can't figure out why so many sites use UBB...
I question your rationale of claiming that WWW threads needs to be ported for speed considerations.
From a resource perspective PHP is much easier on the system then mod_perl/mysql. PHP was designed to work with mysql and allows a lot of cool features in that arena. I am not sure why its less resource intensive, but I know it is based on performance testing we've done using wwwthreads and other php message boards.
There was also an article in a linux magazine recently about memory leaks using constant connections in mod_perl and mysql. We've been experiencing this for a while and never could figure out what the problem is. We have very active boards (20,000 members).
Other notes, if you are using a site with PHP this opens the doors to fully integrate wwwthreads into everything else on your site. That is the biggest benefit to us. Perl cannot print out php, so all of our headers/footers and php code had to be hacked to work with wwwthreads in the past. Now it can be seamless.
Well.. You are right, but there are also other things that come in to play..
There are -some- set backs to using mod_perl (like if your code isn't written with mod_perl in mind it might not run as expected.. global vars stay in memory etc.. was wwwthreads writen to take mod_perl into account?)
You have to also remember that some people who have the ability to run PHP might not have the ability to run Perl (don't ask me why, but I'm sure this is true for somebody out there)
I do remember reading through wwwthreads source and seeing comments like "this feature doesn't work under mod_perl" etc...
Also I think that if wwwthreads was written in PHP it would make it 10x easier to hack the layout of your forum..
Since PHP is embeded into HTML like ASP it keeps the HTML code cleaner looking and easier to change where as perl the HTML code usually looks very ugly....
Once again.. Don't get me wrong.. I love perl.. I write perl for a living..
Oh and about the UBB comment... I agree.. try vbulletin <A HREF="http://www.vbulletin.com" target="_new">http://www.vbulletin.com</A> it's not as good as wwwthreads, but it's a decent php forum that copies UBB's style (I hate not having threaded view though)
Off Topic: >>I still think Perl is a lot more fun to develop in though.. Especially when you start doing OO stuff (adds some spice to the same old boring Perl stuff) =)
Do tell about 'doing OO stuff' - it sounds exciting. I love Perl. There's something very satisfying about it that I think I'm going to miss if I switch to php...
>>I do remember reading through wwwthreads source and seeing comments like "this feature doesn't work under mod_perl" etc...
Some of my hacks such as the on-the-fly Language Switcher won't work with mod_perl because of its being compiled up front. Will switching to php mean that everybody will now be able to use it?
In perl you can write the .pm (packages) to be object oriented. (like C++ or Java)..
If you have O'Reilly's "Programming Perl" book read page 289 (2nd edtion)
Or grab "Object Oriented Perl" by Damian Conway that is a very good book (has a lot of info about object oreinted programing in general and how it applies to perl).
I'm still learning or I would go into more details.. Read up on some of the cocepts of OOP to see the pluses of using it <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />
Oh, another thing.. writing perl object oriented perl modules is suppose to make it a little bit slower, so that is the down side <img border="0" title="" alt="[Frown]" src="images/icons/frown.gif" />
------------------------------------------------ Jeremy 'PeelBoy' Amberg
I do not have any hard facts but my web hosting company told me they think php based forums are easier on the server then perl based forum.
All I know is wwwthreads is the best forum around and a PHP version would be a dream for me since I have tons of PHP knowledge and almost zero perl skills.
I have tons of PHP knowledge and almost zero perl skills.
I think this is one of the real driving factors for a lot of the people that make the most noise out there <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" /> . I've seen so many things rewritten over the years in the new maintainer's favorite language that it's amazing. Don't get me wrong, I'm not against the PHP version and I'll switch if it provides a better solution. But that's the real key for me, I'll choose whichever provides the most benefit.
Nope. Apparently all the variables are hewn in stone. They tell me that once you've set them up front, that's it.
Have a look at the row of flags at <A HREF="http://www.amdragon.com/cgi-bin/wwwthreads/wwwthreads.pl?Cat=" target="_new">Amdragon</A>. If you click the French flag, the whole board switches over to French instantly. Then click the German flag and everthing goes German. Could php handle that?
Actually I think you can make perl print out PHP hehe.. but why would you want too? =) just make the server run the perl first, then have it parse the output for PHP code before it prints it to the client.. ugh.. not the best idea <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" /> I bet if you edit the http.conf file and add .pl or .cgi as an ext for php it would work =) (dunno though I haven't tried it)
------------------------------------------------ Jeremy 'PeelBoy' Amberg
I'm sure mod_perl could also, but maybe it would just take a lot of thinking to figure out a different way of doing it so that mod_perl wouldn't freak out? I dunno.. Anything is possible, but I guess not everything is feasible huh? <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />
err I mean it's possible but probably not feasible (like.. it might require re-writing how la nuages are handled....etc.. dunno.. but I know it can be done hehe)
Does it not work because language vars are global? (ugh)
------------------------------------------------ Jeremy 'PeelBoy' Amberg<P ID="edit"><FONT SIZE=-1><EM>Edited by PeelBoy on 10/17/00 02:14 PM.</EM></FONT>
Sounds to me like you're saying - in a roundabout way - that NO, php can't handle it either! Umnn - so what's with these supposedly 'improved' languages!?!
php would allow you to have the language switcher in it. You don't have the pre-compiling that you do with mod_perl.
Mod_perl pre-compiles all declared .pm files. And since w3t.pm needs to have language files it compiles those in at startup. That is why you can't switch languages. Under normal perl it checks the cookie each time w3t.pm is compiled (oncer per script) and compiles the proper language for that one instance.
I wasn't saying it isn't possible in PHP.. I'm pretty sure it IS possible (with out any weird hacks) but since I don't know 100% about how it works and stuff, I wasn't sure if it would work in PHP or not (so I kept my big mouth closed so I don't look like a fool.. I'm good at that) =)
What I was saying is that you can get it to work with mod_perl, but probably not with out doing some major hacks on the way languages currently work <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" /> (in other words, it's possible but not feasible)
------------------------------------------------ Jeremy 'PeelBoy' Amberg
For every hit your server gets, another instance of perl is started (so that it can execute the cgi file that the user requested)..
mod_perl and php are both run from the apache server level, and a new instance isn't started for each hit you get. Everything is already there and running..
That probably helps free up quite a bit of memory for the server when you have a heavy load also.
I'm sure there is a bunch of other stuff too that I don't know about.. I just know the basics of it :\
------------------------------------------------ Jeremy 'PeelBoy' Amberg
Minus of course the real 5.1 release <img border="0" title="" alt="[Wink]" src="images/icons/wink.gif" /> . And I now have a moderated forum, so admin changes are welcome too!
ya technically laguange switching could be done on the fly without a doubt. someone at vb was working on a way to switch all the text on the fly. like this post in spanish. but i don't think it went that far.
and lastly i wanna integrate wwwthreads (perl for now), with phpnuke.org somehow. just the user base at least.
-------------- your ad here! adspace@extremeforums.org <A HREF="http://www.extremeforums.org" target="_new">http://www.extremeforums.org</A>