[PHP] PHP vs JAVA
Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
Tedd Sperling t...@sperling.com wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Is he possibly getting confused with Javascript? Thanks, Ash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On 13-08-20 10:00 AM, Tedd Sperling wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. I think you can use w3techs.com as a very reliable source. But your teacher may have been talking about javascript which is not the same thing as java despite the similarity in their names. Javascript is part of the web page, and executes in the users browser. It is very common and may rival PHP in frequency of use. -- Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Aug 20, 2013, at 10:04 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Is he possibly getting confused with Javascript? Thanks, Ash No, this guy is smarter than that -- he's pretty sharp -- so I listen to what he has to say. Here's an interesting link: http://www.sitepoint.com/best-programming-language-of-2013/ But the link does not divide languages between Web and Other -- other than Android Java, which I do not believe is also included in the above Java number. I think there is more going on here than what I know. For example, my college has numerous (over 3) JAVA classes filled to the max, whereas my PHP class was canceled due to lack of students. Granted the college could have advertised my PHP class more, but still there is an overwhelming demand for Java Programmers. My questions is Why? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On 13-08-20 10:19 AM, Tedd Sperling wrote: On Aug 20, 2013, at 10:04 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Is he possibly getting confused with Javascript? Thanks, Ash No, this guy is smarter than that -- he's pretty sharp -- so I listen to what he has to say. Here's an interesting link: http://www.sitepoint.com/best-programming-language-of-2013/ But the link does not divide languages between Web and Other -- other than Android Java, which I do not believe is also included in the above Java number. I think there is more going on here than what I know. For example, my college has numerous (over 3) JAVA classes filled to the max, whereas my PHP class was canceled due to lack of students. Granted the college could have advertised my PHP class more, but still there is an overwhelming demand for Java Programmers. My questions is Why? I think that the overwhelming majority of Android apps are written in JAVA. That explains its popularity. -- Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
2013/8/20 Tedd Sperling t...@sperling.com On Aug 20, 2013, at 10:04 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Is he possibly getting confused with Javascript? Thanks, Ash No, this guy is smarter than that -- he's pretty sharp -- so I listen to what he has to say. Here's an interesting link: http://www.sitepoint.com/best-programming-language-of-2013/ But the link does not divide languages between Web and Other -- other than Android Java, which I do not believe is also included in the above Java number. I think there is more going on here than what I know. For example, my college has numerous (over 3) JAVA classes filled to the max, whereas my PHP class was canceled due to lack of students. Granted the college could have advertised my PHP class more, but still there is an overwhelming demand for Java Programmers. My questions is Why? Just tell your teacher: Java isn't more popular than PHP as _web_-language ;) I think too, that he actually meant javascript, which is indeed a very popular client-side language. But javascript and PHP has different use-cases, thus saying one is more popular doesn't tell you anything about whether they are in competition against each other, or not (hint: they arent : :D). Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch
Re: [PHP] PHP vs JAVA
The article very clearly says.. No language can be considered as good just because there are more jobs for the same. Yes, but I am not making a value (good/bad) judgment -- Instead I am asking for references supporting which language (Java or PHP) as being the most popular for Web Development? Do you have any? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
I think the big takeaway there is that JAVA is one of the primary language for larger companies and applications. Start ups tend to use smaller easier to use tools like php / javascript / python / ruby. I saw one figure recently that put php at 75% of websites out there (i think that came out when google decided to support php for the app engine) On Tue, Aug 20, 2013 at 10:19 AM, Tedd Sperling t...@sperling.com wrote: On Aug 20, 2013, at 10:04 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Is he possibly getting confused with Javascript? Thanks, Ash No, this guy is smarter than that -- he's pretty sharp -- so I listen to what he has to say. Here's an interesting link: http://www.sitepoint.com/best-programming-language-of-2013/ But the link does not divide languages between Web and Other -- other than Android Java, which I do not believe is also included in the above Java number. I think there is more going on here than what I know. For example, my college has numerous (over 3) JAVA classes filled to the max, whereas my PHP class was canceled due to lack of students. Granted the college could have advertised my PHP class more, but still there is an overwhelming demand for Java Programmers. My questions is Why? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Bastien Cat, the other other white meat
Re: [PHP] PHP vs JAVA
On Aug 20, 2013, at 10:29 AM, Sebastian Krebs krebs@gmail.com wrote: Just tell your teacher: Java isn't more popular than PHP as _web_-language ;) I think too, that he actually meant javascript, which is indeed a very popular client-side language. But javascript and PHP has different use-cases, thus saying one is more popular doesn't tell you anything about whether they are in competition against each other, or not (hint: they arent : :D). Two things: 1. He's not my teacher -- he is a fellow teacher AND a smart one! He knows the difference between Java and JavaScript. 2. In life, you will find that popularity (often over which is best) is the main reason why things prosper. Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Aug 20, 2013, at 10:36 AM, Liam l...@3sharpltd.com wrote: You do realise you are on a PHP based user subscription, so the vast majority will go with PHP, so you will get a one sided argument. Regards, Liam I realize that many, maybe the majority, will be bias. HOWEVER -- there are professionals on this list that do know and it is to them I am asking. Remember, I am also asking for supporting documentation of their view. The people who respond with just their opinion are doing just that -- there is no support. My nature is to seek the truth regardless of my bias. Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
Here are two references from the Wikipedia article on Java in case you haven't looked at them already. http://www.langpop.com/ http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html On 20 August 2013 10:43, Tedd Sperling t...@sperling.com wrote: On Aug 20, 2013, at 10:36 AM, Liam l...@3sharpltd.com wrote: You do realise you are on a PHP based user subscription, so the vast majority will go with PHP, so you will get a one sided argument. Regards, Liam I realize that many, maybe the majority, will be bias. HOWEVER -- there are professionals on this list that do know and it is to them I am asking. Remember, I am also asking for supporting documentation of their view. The people who respond with just their opinion are doing just that -- there is no support. My nature is to seek the truth regardless of my bias. Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Tue, Aug 20, 2013 at 10:43 AM, Tedd Sperling t...@sperling.com wrote: On Aug 20, 2013, at 10:36 AM, Liam l...@3sharpltd.com wrote: You do realise you are on a PHP based user subscription, so the vast majority will go with PHP, so you will get a one sided argument. Regards, Liam I realize that many, maybe the majority, will be bias. HOWEVER -- there are professionals on this list that do know and it is to them I am asking. Remember, I am also asking for supporting documentation of their view. The people who respond with just their opinion are doing just that -- there is no support. My nature is to seek the truth regardless of my bias. Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Tue, Aug 20, 2013 at 10:56 AM, David OBrien dgobr...@gmail.com wrote: On Tue, Aug 20, 2013 at 10:43 AM, Tedd Sperling t...@sperling.com wrote: On Aug 20, 2013, at 10:36 AM, Liam l...@3sharpltd.com wrote: You do realise you are on a PHP based user subscription, so the vast majority will go with PHP, so you will get a one sided argument. Regards, Liam I realize that many, maybe the majority, will be bias. HOWEVER -- there are professionals on this list that do know and it is to them I am asking. Remember, I am also asking for supporting documentation of their view. The people who respond with just their opinion are doing just that -- there is no support. My nature is to seek the truth regardless of my bias. Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If your looking for popularity... http://w3techs.com/technologies/overview/programming_language/all
Re: [PHP] PHP vs JAVA
2013/8/20 Tedd Sperling t...@sperling.com On Aug 20, 2013, at 10:29 AM, Sebastian Krebs krebs@gmail.com wrote: Just tell your teacher: Java isn't more popular than PHP as _web_-language ;) I think too, that he actually meant javascript, which is indeed a very popular client-side language. But javascript and PHP has different use-cases, thus saying one is more popular doesn't tell you anything about whether they are in competition against each other, or not (hint: they arent : :D). Two things: 1. He's not my teacher -- he is a fellow teacher AND a smart one! He knows the difference between Java and JavaScript. OKOK, sorry -_- But @topic: For example see http://w3techs.com/technologies/overview/programming_language/all Really: Java is a good and mature language, but it is not a web-language. 2. In life, you will find that popularity (often over which is best) is the main reason why things prosper. I am not saying, that Java is bad, or it is not popular. It is just not that popular in the web-ecosystem :) There was one statement I remember (I don't know, where I got it from): A static language doesn't fit very well into the dynamic web. :) Cheers, tedd ___ tedd sperling t...@sperling.com -- github.com/KingCrunch
Re: [PHP] PHP vs JAVA
Sebastian Krebs wrote: 1. He's not my teacher -- he is a fellow teacher AND a smart one! He knows the difference between Java and JavaScript. OKOK, sorry -_- But @topic: For example see http://w3techs.com/technologies/overview/programming_language/all Really: Java is a good and mature language, but it is not a web-language. 2. In life, you will find that popularity (often over which is best) is the main reason why things prosper. I think he is simply wrong in his interpretation of the facts. The number of websites powered by PHP vastly exceeds Java and every other language http://w3techs.com/technologies/overview/programming_language/all Says it all! But you would never use PHP for a distributed application, and then http://www.langpop.com/ comes into play when the fight is between Java and C/C++ and personally I'm happier with C/C++ than Java even on Android. But even though you would not use PHP for distributed applications, it still gets a good 4th in that chart as well. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Tue, Aug 20, 2013 at 10:00 AM, Tedd Sperling t...@sperling.com wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? While I couldn't find anything comparable - from the same source and window of time - for Java trends on the web, there was an article released by Netcraft in January of this year that shows PHPs continued growth[1]. It may, at the least, provide a basis for comparison should you or your adversary be so inclined to dig deeper. ^1: http://news.netcraft.com/archives/2013/01/31/php-just-grows-grows.html -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
What a co-incidence! I was searching PHP vs Python in google and reading articles. Now a similar mail on my inbox. When any language war goes on, everyone gets biased by the language he/she loves. It applies here too. I think your college teacher loves Java. During PHPvsPython search I found this info graphic https://www.udemy.com/blog/modern-language-wars/#. Some of the statistics contain Java too. Also you can search PHP and Web Development in big job sites and compare with same search but with Java. On Tue, Aug 20, 2013 at 8:00 PM, Tedd Sperling t...@sperling.com wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distinguishes between follower and leader -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
shiplu wrote: During PHPvsPython search I found this info graphic https://www.udemy.com/blog/modern-language-wars/#. Some of the statistics contain Java too. Also you can search PHP and Web Development in big job sites and compare with same search but with Java. 'Python is arguably the most readable programming language' probably says it all? Personally I find it almost impossible to understand when coming in cold to someone elses code ... Java is not much better ... but I still have to persist with both since some key elements of a usable PHP IDE now rely on both :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Tue, Aug 20, 2013 at 05:09:37PM +0100, Lester Caine wrote: shiplu wrote: During PHPvsPython search I found this info graphic https://www.udemy.com/blog/modern-language-wars/#. Some of the statistics contain Java too. Also you can search PHP and Web Development in big job sites and compare with same search but with Java. 'Python is arguably the most readable programming language' probably says it all? Personally I find it almost impossible to understand when coming in cold to someone elses code ... Java is not much better ... but I still have to persist with both since some key elements of a usable PHP IDE now rely on both :( Python may be most readable, but it's a huge fail for two reasons: 1. There are no statement terminators. Lose your indentation for ANY reason and your program is well and truly screwed, in ways you can't imagine. 2. Python programs fail in the most ungraceful way I've ever seen in an interpreted programming language. (Don't even start in on C. It's a compiled language.) Java is an incredibly heavy language for web work. Much like Ruby but more so. I'll say it again-- one of the reasons for the popularity of PHP is its similarity to C, at least a passing skill in which is common to most programmers. Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On 20/08/13 15:00, Tedd Sperling wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd ___ tedd sperling t...@sperling.com tedd, Java is a meticulously-constructed language with very strict typing and a large commercial organisation which purports to support and develop it. PHP is a scruffy heap of loosely typed cruft which is easy to knock together and build big things from, but has a semi-commercial and community support structure. Guess which one the big commercial organistations (banks, industry etc.) prefer to trust? Guess which is then popular for college courses since it provides the students with a basis in something that is commercially desirable? From my personal point of view, I started with BASIC, then FORTRAN (in a scientific environment), then C/C++, then Java (which I saw as the language C++ should have been), and then moved on to PHP in a search to find a way of building web apps in the sort of timescales that small-medium enterprises are prepared to accept. Popularity is in the eye of the beholder... Cheers Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On 8/20/13 9:00 AM, Tedd Sperling wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd As others have said, he's simply wrong. :-) Goodness of either language aside, the data (W3Techs is what I usually cite) is clear: For server-side web dev, PHP is the 800 lb gorilla. For all programming combined? Java may be bigger than PHP, sure. For embedded? No question, Java PHP as PHP has almost no presence. For enterprise shops? There probably are segments of the market that are very Java-centric, even on the web, no question. It's all how you define your scope. I'm sure he could come up with some definition of market that would show Java having a bigger marketshare than PHP, within that market. The question is whether that is a valid definition of market in context. Lies, damned lies, and statistics. :-) As countering data-points: Wordpress alone is 18% of the web. Drupal is the #1 CMS used to power US government websites. Universities and Museums are very big on Drupal. (That's my day job. g) PHP's marketshare is huge, even in enterprise. --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
I'll chime in on this one. I've been job hunting recently, and I can say that while I've seen a lot of people asking for Java experience, I'm not sure I've seen a single posting asking specifically for PHP. There've been a few looking for Drupal, or Wordpress, but no You must be able to write PHP code to work here. I can also say that the more I work with Java-based programs, the more I want to see Java written into history books as a terrible idea that sadly persisted until nearly 2014. As an example: I need to provide IT support to people using a tool written in Java. It turns out that if you install Java 7, the tool doesn't work at all. If you install Java 6 with the newest updates, it works, but occasionally crashes the entire computer. No, you have to have Java 6 update 22 in order for this software to be reliable. There are other tools I've used that failed completely on minor version switches, and that just plain SHOULDN'T HAPPEN. Yes, there are going to be minor changes when a language upgrades, that's why there are upgrades. But they're usually minor, in a This didn't work the way it was supposed to, so we fixed it kind of way. If you were taking advantage of that bug, you get knocked down, but the vast majority of software will keep running. Java doesn't seem to work that way, at least from an IT worker's perspective. Andy McKenzie On Tue, Aug 20, 2013 at 10:00 AM, Tedd Sperling t...@sperling.com wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
2013/8/20 Lester Caine les...@lsces.co.uk Sebastian Krebs wrote: 1. He's not my teacher -- he is a fellow teacher AND a smart one! He knows the difference between Java and JavaScript. OKOK, sorry -_- But @topic: For example see http://w3techs.com/**technologies/overview/**programming_language/allhttp://w3techs.com/technologies/overview/programming_language/all Really: Java is a good and mature language, but it is not a web-language. 2. In life, you will find that popularity (often over which is best) is the main reason why things prosper. I think he is simply wrong in his interpretation of the facts. The number of websites powered by PHP vastly exceeds Java and every other language http://w3techs.com/**technologies/overview/**programming_language/allhttp://w3techs.com/technologies/overview/programming_language/all Says it all! But you would never use PHP for a distributed application, and then http://www.langpop.com/ comes into play when the fight is between Java and C/C++ and personally I'm happier with C/C++ than Java even on Android. But even though you would not use PHP for distributed applications, it still gets a good 4th in that chart as well. Exactly, but the initial explicitly states, that this is about web development :D Don't know, what I should think about langpop.com. A popularity listing, that doesn't take github (or any other repo hoster, than google code) into account? :? Its also quite outdated... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.**ukhttp://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch
Re: [PHP] PHP vs JAVA
2013/8/20 Andy McKenzie amckenz...@gmail.com I'll chime in on this one. I've been job hunting recently, and I can say that while I've seen a lot of people asking for Java experience, I'm not sure I've seen a single posting asking specifically for PHP. There've been a few looking for Drupal, or Wordpress, but no You must be able to write PHP code to work here. Thats interesting. I am from Berlin and here, when you say you know PHP and a little bit of one, or two frameworks, they will jump onto you :D I can also say that the more I work with Java-based programs, the more I want to see Java written into history books as a terrible idea that sadly persisted until nearly 2014. As an example: I need to provide IT support to people using a tool written in Java. It turns out that if you install Java 7, the tool doesn't work at all. If you install Java 6 with the newest updates, it works, but occasionally crashes the entire computer. No, you have to have Java 6 update 22 in order for this software to be reliable. There are other tools I've used that failed completely on minor version switches, and that just plain SHOULDN'T HAPPEN. Yes, there are going to be minor changes when a language upgrades, that's why there are upgrades. But they're usually minor, in a This didn't work the way it was supposed to, so we fixed it kind of way. If you were taking advantage of that bug, you get knocked down, but the vast majority of software will keep running. Java doesn't seem to work that way, at least from an IT worker's perspective. Andy McKenzie On Tue, Aug 20, 2013 at 10:00 AM, Tedd Sperling t...@sperling.com wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) Here are my two references: http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/history_overview/programming_language/ms/y But I do not know how accurate they are. What say you? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch
Re: [PHP] PHP vs JAVA
On Aug 20, 2013, at 12:24 PM, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Aug 20, 2013 at 05:09:37PM +0100, Lester Caine wrote: shiplu wrote: During PHPvsPython search I found this info graphic https://www.udemy.com/blog/modern-language-wars/#. Some of the statistics contain Java too. Also you can search PHP and Web Development in big job sites and compare with same search but with Java. 'Python is arguably the most readable programming language' probably says it all? Personally I find it almost impossible to understand when coming in cold to someone elses code ... Java is not much better ... but I still have to persist with both since some key elements of a usable PHP IDE now rely on both :( Python may be most readable, but it's a huge fail for two reasons: 1. There are no statement terminators. Lose your indentation for ANY reason and your program is well and truly screwed, in ways you can't imagine. 2. Python programs fail in the most ungraceful way I've ever seen in an interpreted programming language. And no ternary operator. tedd ___ tedd sperling tedd.sperl...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
1. There are no statement terminators. Lose your indentation for ANY reason and your program is well and truly screwed, in ways you can't imagine. 2. Python programs fail in the most ungraceful way I've ever seen in an interpreted programming language. 1. Indent properly. In php, if you put an open or close brace out of place your code will break in unexpected ways as well. If it's hard to tell if something is indented properly, your code should be refactored so that it is. 2. In my experience this has a lot to do with how some people use python and not python itself. On Tue, Aug 20, 2013 at 12:12 PM, Tedd Sperling tedd.sperl...@gmail.comwrote: On Aug 20, 2013, at 12:24 PM, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Aug 20, 2013 at 05:09:37PM +0100, Lester Caine wrote: shiplu wrote: During PHPvsPython search I found this info graphic https://www.udemy.com/blog/modern-language-wars/#. Some of the statistics contain Java too. Also you can search PHP and Web Development in big job sites and compare with same search but with Java. 'Python is arguably the most readable programming language' probably says it all? Personally I find it almost impossible to understand when coming in cold to someone elses code ... Java is not much better ... but I still have to persist with both since some key elements of a usable PHP IDE now rely on both :( Python may be most readable, but it's a huge fail for two reasons: 1. There are no statement terminators. Lose your indentation for ANY reason and your program is well and truly screwed, in ways you can't imagine. 2. Python programs fail in the most ungraceful way I've ever seen in an interpreted programming language. And no ternary operator. tedd ___ tedd sperling tedd.sperl...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- From the desk of Dan Munro
Re: [PHP] PHP vs JAVA
On Aug 20, 2013, at 12:24 PM, Pete Ford p...@justcroft.com wrote: tedd, Java is a meticulously-constructed language with very strict typing and a large commercial organisation which purports to support and develop it. PHP is a scruffy heap of loosely typed cruft which is easy to knock together and build big things from, but has a semi-commercial and community support structure. Thanks for the info. :-) FYI -- I am teaching both PHP and JAVA at college level and have taught both for several years as well as other Web Languages. My recent question was simply an attempt to get documentation to support which server-side Web Language is the most popular. Both PHP and Java can be used server-side. I also realize that Java is used for native Android because I also teach Mobile Application Development (MAD -- I even coined the name). So, I am up to my butt in languages (and people who think different than me) -- I'm just trying to get documentation to back up my what I think I know. Thanks, tedd ___ tedd sperling tedd.sperl...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Tue, Aug 20, 2013 at 3:18 PM, Dan Munro d...@danmunro.com wrote: 1. There are no statement terminators. Lose your indentation for ANY reason and your program is well and truly screwed, in ways you can't imagine. 2. Python programs fail in the most ungraceful way I've ever seen in an interpreted programming language. 1. Indent properly. In php, if you put an open or close brace out of place your code will break in unexpected ways as well. If it's hard to tell if something is indented properly, your code should be refactored so that it is. 2. In my experience this has a lot to do with how some people use python and not python itself. I can't argue on point two, since that's where all of my worst failure have come from. But as to indenting, I have had the problem of opening a file on a new OS, only to find that the default editor there has wiped out my formatting. With PHP, that's not a big deal: as long as I put my braces in the right places, everything will continue to work. With Python -- or any whitespace delimited language -- it's fatal, and I have to hope I can exit without saving anything. Andy
Re: [PHP] PHP vs JAVA
On Aug 20, 2013, at 2:19 PM, Sebastian Krebs krebs@gmail.com wrote: Thats interesting. I am from Berlin and here, when you say you know PHP and a little bit of one, or two frameworks, they will jump onto you I'll stay away from Berlin. :-) tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
2013/8/20 Andy McKenzie amckenz...@gmail.com On Tue, Aug 20, 2013 at 3:18 PM, Dan Munro d...@danmunro.com wrote: 1. There are no statement terminators. Lose your indentation for ANY reason and your program is well and truly screwed, in ways you can't imagine. 2. Python programs fail in the most ungraceful way I've ever seen in an interpreted programming language. 1. Indent properly. In php, if you put an open or close brace out of place your code will break in unexpected ways as well. If it's hard to tell if something is indented properly, your code should be refactored so that it is. 2. In my experience this has a lot to do with how some people use python and not python itself. I can't argue on point two, since that's where all of my worst failure have come from. But as to indenting, I have had the problem of opening a file on a new OS, only to find that the default editor there has wiped out my formatting. Who is with me? Thats a good point to restart the tabs-vs-spaces-discussion, isn't? *duckandrun* :D With PHP, that's not a big deal: as long as I put my braces in the right places, everything will continue to work. With Python -- or any whitespace delimited language -- it's fatal, and I have to hope I can exit without saving anything. Andy -- github.com/KingCrunch
RE: [PHP] PHP vs JAVA
My recent question was simply an attempt to get documentation to support which server-side Web Language is the most popular. Both PHP and Java can be used server-side. I also realize that Java is used for native Android because I also teach Mobile Application Development (MAD -- I even coined the name). So, I am up to my butt in languages (and people who think different than me) -- I'm just trying to get documentation to back up my what I think I know. Well, technically any language can be used server side, it is all on how you set up your server, no? I would tend to think that the biggest out there, is html/php/javascript... and next to that, would be asp, and then java. Do I have proof of this? No, can I get proof, I doubt it, and are there stats on this? To be honest, in my opinion, that would be like asking how big is the internet?. It is virtually an immeasurable object. There are so many websites out there, that you can't search them all... PHP is simple, and yet powerful to use, and is pretty much the standard for all hosting companies. Now, there is this link... http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html It shows Java as #1, and php as #5, but this is also for PROGRAMMING, does not specify web based programming vs desktop vs MAD (thanks tedd ;) ) so the numbers do not really speak out in this application. Does it really matter? PHP is very huge, widely used, and I would even go so far as to say the 'norm' for website developers, and hosting providers. But that is my $0.02, and for me, I have been with PHP for 7 years professionally, and in college I took VB.net, ASP.net, C++, JAVA and PHP. Only recently have I gotten into C# for desktop applications. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
2013/8/20 Steven Staples sstap...@mnsi.net My recent question was simply an attempt to get documentation to support which server-side Web Language is the most popular. Both PHP and Java can be used server-side. I also realize that Java is used for native Android because I also teach Mobile Application Development (MAD -- I even coined the name). So, I am up to my butt in languages (and people who think different than me) -- I'm just trying to get documentation to back up my what I think I know. Well, technically any language can be used server side, it is all on how you set up your server, no? No. But since node.js I lack an example :D But of course you need the link between the language and the network. I would tend to think that the biggest out there, is html/php/javascript... and next to that, would be asp, and then java. Do I have proof of this? No, can I get proof, I doubt it, and are there stats on this? To be honest, in my opinion, that would be like asking how big is the internet?. It is virtually an immeasurable object. There are so many websites out there, that you can't search them all... Of course you cannot search them _all_, but again the link: http://w3techs.com/technologies/overview/programming_language/all There are good hints, how the internet looks like. For example a hoster can simply look at the products he sell. Services like w3techs.com use the reports from the server themself (in most cases the headers), or the file-ending (doesn't work anymore that good, since most sites hide them ;)) and extrapolate this. Of course they are not exact, but I think they show the direction quite accurate. PHP is simple, and yet powerful to use, and is pretty much the standard for all hosting companies. Now, there is this link... http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html It shows Java as #1, and php as #5, but this is also for PROGRAMMING, does not specify web based programming vs desktop vs MAD (thanks tedd ;) ) so the numbers do not really speak out in this application. Also it is the Tiobe-Index. Although it is widely-referenced, the way it calculates their rankings is ... interesting. In fact it only tells you how loud a community around a specific language is. So for example maybe Java is #1, because it is so complex, that it leads to many questions in forums and on stackoverflow. Or PHP is only #5, because most communication is on IRC, or mailinglists. (disclaimer: Of course I faked this examples. Actually I have no idea how the communities around Java and PHP as a whole interacts primary, but I don't think, that they are all equal). I just think, that the Tiobe-Index has a completely different view on what is a popular language, than I have. Does it really matter? PHP is very huge, widely used, and I would even go so far as to say the 'norm' for website developers, and hosting providers. Nope, it doesn't matter :) But that is my $0.02, and for me, I have been with PHP for 7 years professionally, and in college I took VB.net, ASP.net, C++, JAVA and PHP. Only recently have I gotten into C# for desktop applications. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch
Re: [PHP] PHP vs JAVA
in my opinion, that would be like asking how big is the internet?. http://www.washingtonpost.com/blogs/the-switch/wp/2013/08/18/heres-what-you-find-when-you-scan-the-entire-internet-in-an-hour/ On Tue, Aug 20, 2013 at 1:08 PM, Sebastian Krebs krebs@gmail.comwrote: 2013/8/20 Steven Staples sstap...@mnsi.net My recent question was simply an attempt to get documentation to support which server-side Web Language is the most popular. Both PHP and Java can be used server-side. I also realize that Java is used for native Android because I also teach Mobile Application Development (MAD -- I even coined the name). So, I am up to my butt in languages (and people who think different than me) -- I'm just trying to get documentation to back up my what I think I know. Well, technically any language can be used server side, it is all on how you set up your server, no? No. But since node.js I lack an example :D But of course you need the link between the language and the network. I would tend to think that the biggest out there, is html/php/javascript... and next to that, would be asp, and then java. Do I have proof of this? No, can I get proof, I doubt it, and are there stats on this? To be honest, in my opinion, that would be like asking how big is the internet?. It is virtually an immeasurable object. There are so many websites out there, that you can't search them all... Of course you cannot search them _all_, but again the link: http://w3techs.com/technologies/overview/programming_language/all There are good hints, how the internet looks like. For example a hoster can simply look at the products he sell. Services like w3techs.com use the reports from the server themself (in most cases the headers), or the file-ending (doesn't work anymore that good, since most sites hide them ;)) and extrapolate this. Of course they are not exact, but I think they show the direction quite accurate. PHP is simple, and yet powerful to use, and is pretty much the standard for all hosting companies. Now, there is this link... http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html It shows Java as #1, and php as #5, but this is also for PROGRAMMING, does not specify web based programming vs desktop vs MAD (thanks tedd ;) ) so the numbers do not really speak out in this application. Also it is the Tiobe-Index. Although it is widely-referenced, the way it calculates their rankings is ... interesting. In fact it only tells you how loud a community around a specific language is. So for example maybe Java is #1, because it is so complex, that it leads to many questions in forums and on stackoverflow. Or PHP is only #5, because most communication is on IRC, or mailinglists. (disclaimer: Of course I faked this examples. Actually I have no idea how the communities around Java and PHP as a whole interacts primary, but I don't think, that they are all equal). I just think, that the Tiobe-Index has a completely different view on what is a popular language, than I have. Does it really matter? PHP is very huge, widely used, and I would even go so far as to say the 'norm' for website developers, and hosting providers. Nope, it doesn't matter :) But that is my $0.02, and for me, I have been with PHP for 7 years professionally, and in college I took VB.net, ASP.net, C++, JAVA and PHP. Only recently have I gotten into C# for desktop applications. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch -- From the desk of Dan Munro
Re: [PHP] PHP vs JAVA
On 20 Aug 2013, at 21:08, Sebastian Krebs krebs@gmail.com wrote: 2013/8/20 Steven Staples sstap...@mnsi.net My recent question was simply an attempt to get documentation to support which server-side Web Language is the most popular. Both PHP and Java can be used server-side. I also realize that Java is used for native Android because I also teach Mobile Application Development (MAD -- I even coined the name). So, I am up to my butt in languages (and people who think different than me) -- I'm just trying to get documentation to back up my what I think I know. Well, technically any language can be used server side, it is all on how you set up your server, no? No. But since node.js I lack an example :D But of course you need the link between the language and the network. The language and the 'link between the language and the network' are two completely separate things. The link, as you put it, is the web server. A web server doesn't need to do anything more than set up environment variables and run an executable, and even setting up the environment is technically optional. BASH can build web pages. I wouldn't recommend using BASH, but there's nothing technically preventing it. Node.js is not the only way to run Javascript outside a browser, and other ways of doing so existed long before Node.js arrived. Most limitations people put on technology are artificial constructions rather than real constraints. tedd: I wouldn't trust any stats you might find since, as has been pointed out, it's incredibly difficult to accurately measure. I'd be careful with the word popular because it really depends on what you're measuring. If you're talking public websites then I'd agree that, anecdotally at least, PHP is more common than any other server-side language. If you're talking about public site visitors or page views it's definitely the most popular, but that's massively skewed by Facebook if you accept that their way of using PHP can still be called PHP. Enterprise usage of PHP is far lower, mainly due to Microsoft's dominance, but I get the feeling this is changing, albeit incredibly slowly. If he means Java is the most popular as in developers would prefer to use it then I'd definitely disagree, but I wouldn't necessarily say that PHP is at the top of that list either. Ultimately I'd want to know what he's trying to prove by saying that. If he's purely engaging in a mine's bigger than yours discussion I'd walk away, leave him to his petty games and actually accomplish something with the time instead. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On 20 Aug 2013, at 21:30, Dan Munro d...@danmunro.com wrote: in my opinion, that would be like asking how big is the internet?. http://www.washingtonpost.com/blogs/the-switch/wp/2013/08/18/heres-what-you-find-when-you-scan-the-entire-internet-in-an-hour/ That's scanning IP addresses and doesn't come close to answering how big is the internet, assuming that means how many sites are there rather than how many publicly responsive edge servers exist. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
On Tue, 2013-08-20 at 21:44 +0100, Stuart Dallas wrote: On 20 Aug 2013, at 21:30, Dan Munro d...@danmunro.com wrote: in my opinion, that would be like asking how big is the internet?. http://www.washingtonpost.com/blogs/the-switch/wp/2013/08/18/heres-what-you-find-when-you-scan-the-entire-internet-in-an-hour/ That's scanning IP addresses and doesn't come close to answering how big is the internet, assuming that means how many sites are there rather than how many publicly responsive edge servers exist. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ I'd argue that a large proportion of really secure servers out there won't respond to a lot of what Zmap pings out. Nmap works by throwing out requests on a bunch of different ports, not just ping, which is slow, so I'd be surprised if Zmap could really rival that while giving the same results. Bearing in mind there are over 4,000 million (I won't say billion, because that's a million million, despite what the Americans say!) IPv4 address out there, 40 minutes is a ridiculous amount of time to even scan half of that, especially given the fact that IPv6 is being majorly pushed because IPv4 is apparently running out of free address space! Then not forgetting that lots of websites exist on the same IP address/range, I would say the article is lacking on so many details as to be untrue. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] PHP vs JAVA
On 20 Aug 2013, at 22:00, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2013-08-20 at 21:44 +0100, Stuart Dallas wrote: On 20 Aug 2013, at 21:30, Dan Munro d...@danmunro.com wrote: in my opinion, that would be like asking how big is the internet?. http://www.washingtonpost.com/blogs/the-switch/wp/2013/08/18/heres-what-you-find-when-you-scan-the-entire-internet-in-an-hour/ That's scanning IP addresses and doesn't come close to answering how big is the internet, assuming that means how many sites are there rather than how many publicly responsive edge servers exist. I'd argue that a large proportion of really secure servers out there won't respond to a lot of what Zmap pings out. Nmap works by throwing out requests on a bunch of different ports, not just ping, which is slow, so I'd be surprised if Zmap could really rival that while giving the same results. Bearing in mind there are over 4,000 million (I won't say billion, because that's a million million, despite what the Americans say!) IPv4 address out there, 40 minutes is a ridiculous amount of time to even scan half of that, especially given the fact that IPv6 is being majorly pushed because IPv4 is apparently running out of free address space! Then not forgetting that lots of websites exist on the same IP address/range, I would say the article is lacking on so many details as to be untrue. I wouldn't go so far as to say it's untrue, but it's certainly written with exaggerated implications. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
Tedd Sperling wrote: I'm just trying to get documentation to back up my what I think I know. http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites may be a better starting point, but there are no citations to the facts, they are a little dated, and some sites are a little biased in their choices? Move to the top 40 sites and PHP fares a little better - http://rogchap.com/2011/09/06/top-40-website-programming-languages/ but but this data is a little dataed now. Personally I've always used the W3techs figures when I'm doing talks as it is the only consistent source I've found. The netcraft figures would be nice but they only run this intermittently, and last January's figure of 244 million sites at 39% of machines seems a little at odds with the W3techs ones? http://w3techs.com/technologies/history_overview/programming_language continues to show PHP rising at the expense of ASP and Java with Perl, Ruby and Python having trouble to stay above 1% combined over the last year. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
Zmap works by being stateless, so while nmap records which requests go out, zmap fires and forgets, and encodes the request in such a way that the response can provide whatever details it needs to continue the scan. No magic here. On Tue, Aug 20, 2013 at 2:28 PM, Lester Caine les...@lsces.co.uk wrote: Tedd Sperling wrote: I'm just trying to get documentation to back up my what I think I know. http://en.wikipedia.org/wiki/**Programming_languages_used_in_** most_popular_websiteshttp://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websitesmay be a better starting point, but there are no citations to the facts, they are a little dated, and some sites are a little biased in their choices? Move to the top 40 sites and PHP fares a little better - http://rogchap.com/2011/09/06/**top-40-website-programming-**languages/http://rogchap.com/2011/09/06/top-40-website-programming-languages/but but this data is a little dataed now. Personally I've always used the W3techs figures when I'm doing talks as it is the only consistent source I've found. The netcraft figures would be nice but they only run this intermittently, and last January's figure of 244 million sites at 39% of machines seems a little at odds with the W3techs ones? http://w3techs.com/ **technologies/history_overview/**programming_languagehttp://w3techs.com/technologies/history_overview/programming_languagecontinues to show PHP rising at the expense of ASP and Java with Perl, Ruby and Python having trouble to stay above 1% combined over the last year. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.**ukhttp://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- From the desk of Dan Munro
Re: [PHP] PHP vs JAVA
On 8/20/2013 10:00 AM, Tedd Sperling wrote: Hi guys: A teacher at my college made the statement that JAVA for Web Development is more popular than PHP. Where can I go to prove this right or wrong -- and/or -- what references do any of you have to support your answer? (sounds like a teacher, huh?) While I don't have any references to back it up - my guess would be that Java may be seen as more versatile in general programming terms. A staggering number of enterprise level web applications are built with Java, add to that the possibility of writing Android apps with the same knowledge. Of course, there are many ways to make Android apps without Java - I've written a few myself with simple HTML and Flash Builder. I would say that, in general, the other teacher is incorrect speaking strictly in terms of web development. PHP has already won that crown many times over. That said, when I was in University, it was difficult to find a programming class that taught anything but Java - and that was 10yrs ago now. I chalked it up to the education bubble not being able to see what the rest of the world is actually doing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP to Java integration using : shell_exec function
Hi, Please advise if the following is possible and how can pass parameters from the PHP to the Java application. Thanks. Here's my script draft: ?PHP ... $XML_toEnc = urlencode ($XML); // The XML_toEnc is a string and shall be urlencoded ! $EncXML = shell_exec(/usr/bin/java/java -jar MyApp.jar -XML $XML_toEnc); == ??? How can I pass parameters like a large string of let say XML? echo $EncXML; // back to the MObile Client // Receiving client shall: // urldecode the string ? Eli Orr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP to Java integration using : shell_exec function
On 2011-05-26 12:00, Eli Orr (Office) eli@logodial.com wrote: $EncXML = shell_exec(/usr/bin/java/java -jar MyApp.jar -XML $XML_toEnc); == ??? How can I pass parameters like a large string of let say XML? You're missing the shell escaping. Try something like this: $xml = 'greetinghello/greeting'; $xml_shell = escapeshellarg($xml); $result = shell_exec(/usr/bin/java/java -jar MyApp.jar -XML $xml_shell); See: http://us.php.net/manual/en/function.escapeshellarg.php If you need to pass the value through standard input, you can pipe it out of echo: $result = shell_exec(/bin/echo -n $xml_shell | /usr/bin/java/java -jar MyApp.jar -XML); Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- The Small Business Authority http://www.thesba.com/ Notice: This communication, including attachments, may contain information that is confidential. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If the reader or recipient of this communication is not the intended recipient, an employee or agent of the intended recipient who is responsible for delivering it to the intended recipient, or if you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if any). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP to Java
For reasons we needn't go into, I need to convert this to Java: $to_encode = example.com/api?foo=bar; $key = asdfasdfasdfasdfasdfasdf; //fake value, but 24 bytes $td = mcrypt_module_open('tripledes', '', 'ecb', ''); mcrypt_generic_init ($td, $key, $iv); $c_t = mcrypt_generic ($td, $to_encode); I've been Googling for hours and tried all kinds of stuff, none of which came even close. Any suggestions on a good reference or conversion program or something?... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP to Java
On Thu, Oct 16, 2008 at 4:50 PM, [EMAIL PROTECTED] wrote: Any suggestions on a good reference or conversion program or something?... You could begin by not hiding behind the title of a CEO, Lynch. We know it's you. ;-P -- /Daniel P. Brown More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP to Java
On Oct 16, 2008, at 10:50 PM, [EMAIL PROTECTED] wrote: For reasons we needn't go into, I need to convert this to Java: $to_encode = example.com/api?foo=bar; $key = asdfasdfasdfasdfasdfasdf; //fake value, but 24 bytes $td = mcrypt_module_open('tripledes', '', 'ecb', ''); mcrypt_generic_init ($td, $key, $iv); $c_t = mcrypt_generic ($td, $to_encode); I've been Googling for hours and tried all kinds of stuff, none of which came even close. Any suggestions on a good reference or conversion program or something?... a little somethingsomething String to_encode = new String(example.com/api?foo=bar); String key = new String(asdfasdfasdfasdfasdfasdf); Mcrypt_module td = new Mcrypt_module('tripledes', '', 'ecb', ''); td.init(key, iv); td.mcrypt_generic(to_encode); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Java: accessing Java classes from PHP
Hi If you mean you tried this: http://php.net/java It was the first thing I tried. I will post a bug in http://bugs.php.net Then I read about php-java-bridge but the examples were using older versions of php-jb. That said, I don't see how you could possibly access Java without running Java... But maybe servelets is something separate from the monolithic Java already running? We can't use apache tomcat (java app server). Java is present and running but not tomcat. You might also consider taking a step back and writing a Java program that uses SOAP/RPC/??? to provide the info PHP needs via HTTP instead of trying to get PHP and Java to play nice together at the binary level... I am not the java coder so I have to use the code that already exists. Thank you very much for the answer. greets holo Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, July 27, 2007 10:31 am, Holografix wrote: I need to access some custom and native Java classes from php. I've tried the steps form php manual and php-javabridge from sf but I always get an apache crash. I don't need to run servlets and it's impossible to start servlet engine in the server (project requirements). The tutorials i've found are outdated (old php-javabridge versions) and refer to some files that no longer exists. If someone can point the right direction I would like to see the solution. I'm using win xp pro sp2, php 5.2.3, java 1.6.0_02. If you mean you tried this: http://php.net/java and it crashed, then post a bug report here: http://bugs.php.net/ If you haven't tried that, try it. :-) That said, I don't see how you could possibly access Java without running Java... But maybe servelets is something separate from the monolithic Java already running? You might also consider taking a step back and writing a Java program that uses SOAP/RPC/??? to provide the info PHP needs via HTTP instead of trying to get PHP and Java to play nice together at the binary level... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Java: accessing Java classes from PHP
Hi I need to access some custom and native Java classes from php. I've tried the steps form php manual and php-javabridge from sf but I always get an apache crash. I don't need to run servlets and it's impossible to start servlet engine in the server (project requirements). The tutorials i've found are outdated (old php-javabridge versions) and refer to some files that no longer exists. If someone can point the right direction I would like to see the solution. I'm using win xp pro sp2, php 5.2.3, java 1.6.0_02. Thanks in advance. Greets holo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Java: accessing Java classes from PHP
Hi Thanks for the answer. I'm using php 5 (5.2.3). holo Nathan Nobbe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] if you cant get the php / java bridge to work and you cant run servlets than i dont know what other options you have. we used to use soap for communication between java and php where i worked last, but that would require servlets as well (afaik). the bridge is marked as experimental.. are you using php4 or php5? if youre using 4 the source is there in /ext under the php source. if youre using 5 well i couldt find it on the pecl site [didnt search very long] but you can get the source here http://php-java-bridge.sourceforge.net/pjb/. -nathan On 7/27/07, Holografix [EMAIL PROTECTED] wrote: Hi I need to access some custom and native Java classes from php. I've tried the steps form php manual and php-javabridge from sf but I always get an apache crash. I don't need to run servlets and it's impossible to start servlet engine in the server (project requirements). The tutorials i've found are outdated (old php-javabridge versions) and refer to some files that no longer exists. If someone can point the right direction I would like to see the solution. I'm using win xp pro sp2, php 5.2.3, java 1.6.0_02. Thanks in advance. Greets holo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Java: accessing Java classes from PHP
if you cant get the php / java bridge to work and you cant run servlets than i dont know what other options you have. we used to use soap for communication between java and php where i worked last, but that would require servlets as well (afaik). the bridge is marked as experimental.. are you using php4 or php5? if youre using 4 the source is there in /ext under the php source. if youre using 5 well i couldt find it on the pecl site [didnt search very long] but you can get the source here http://php-java-bridge.sourceforge.net/pjb/. -nathan On 7/27/07, Holografix [EMAIL PROTECTED] wrote: Hi I need to access some custom and native Java classes from php. I've tried the steps form php manual and php-javabridge from sf but I always get an apache crash. I don't need to run servlets and it's impossible to start servlet engine in the server (project requirements). The tutorials i've found are outdated (old php-javabridge versions) and refer to some files that no longer exists. If someone can point the right direction I would like to see the solution. I'm using win xp pro sp2, php 5.2.3, java 1.6.0_02. Thanks in advance. Greets holo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Java: accessing Java classes from PHP
On Fri, July 27, 2007 10:31 am, Holografix wrote: I need to access some custom and native Java classes from php. I've tried the steps form php manual and php-javabridge from sf but I always get an apache crash. I don't need to run servlets and it's impossible to start servlet engine in the server (project requirements). The tutorials i've found are outdated (old php-javabridge versions) and refer to some files that no longer exists. If someone can point the right direction I would like to see the solution. I'm using win xp pro sp2, php 5.2.3, java 1.6.0_02. If you mean you tried this: http://php.net/java and it crashed, then post a bug report here: http://bugs.php.net/ If you haven't tried that, try it. :-) That said, I don't see how you could possibly access Java without running Java... But maybe servelets is something separate from the monolithic Java already running? You might also consider taking a step back and writing a Java program that uses SOAP/RPC/??? to provide the info PHP needs via HTTP instead of trying to get PHP and Java to play nice together at the binary level... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PhP and Java login trouble (can someone help a brother out whom is truely trying to understand?)
I have these to independently working scripts. 1 is php, the other is javascript. For obvious reason, to separate logins are not appropriate. It has been recommended to make a separate function, not sure how to do this Common sense says, carry the variable from php to javascripting. I am clueless on where to look on this common sense solution. I am 2.5 weeks into this madness. I know when I find the solution, it will be the one that was biting me on the nose. I want to learn and understand this, but desperately need help from friends! I will post the 2 complete code pages below.. Input, suggestion or solutions would truly be appreciated. The first will be the original code that is javascripting friendly. The second will be my own php working code. Number one works fine for loging into a FCKEditor application, but is failing with phpbb. Number two works perfectly with phpbb applications and outside php pages requiring phpbb related session controls, but fails sessions with the javascripting based FCKEditor. Sincerely, Brad #1 Working php/phpbb code: ?php if(!isset($_SESSION[userid])) { ? form action=/phpbb/login.php method=post target=_top table width=200 cellpadding=4 cellspacing=1 border=0 class=forumline align=center tr th background=images/login_top2.jpg height=30 class=thHead nowrap=nowrap/th /tr tr td class=row1table border=0 cellpadding=3 cellspacing=1 width=100% tr td width=11% align=rightdiv align=leftspan class=genUsername:/span/div/td /tr tr td align=rightinput type=text class=post name=username size=25 maxlength=40 value= //td /tr tr td align=rightdiv align=leftspan class=genPassword/span/div/td /tr tr td align=rightspan class=gen input type=password class=post name=password size=25 maxlength=32 / :/span/td /tr tr align=center td colspan=2span class=genLog me on automatically: input type=checkbox name=autologin //span/td /tr tr align=center td colspan=2input type=hidden name=redirect value= /input type=submit name=login class=mainoption value=Log in //td /tr tr align=center td colspan=2span class=gensmalla href=forgot_password.php class=gensmallI forgot my password/a/span/td /tr /table /td /tr ?php }else{ ? tr td width=207 height=32 background=images/login_top2.jpg class=headerlogout align=center table width=100% tr td width=30 height=27/td td align=lefta href=javascript:logout() class=link1Log out/a/td /tr /table /td /tr tr td align=center class=logincenterbg table width=88% border=0 cellspacing=0 cellpadding=0 tr td height=10 align=left class=bluetext/td /tr tr td align=left class=link2Welcome : ?php echo $_SESSION[userid] ?/td /tr tr td height=22 align=left class=bluetext/td /tr tr td height=20 align=lefta class=link1 href=editaccount.phpManage Account/a/td /tr tr td height=20 align=lefta class=link1 href=editprofile.phpManage Profile/a/td /tr /table /td /tr tr td align=left valign=topimg src=images/login_bottom.jpg width=200 height=8 alt= //td /tr /table /form ?php } ? /table/td /tr tr td height=5/td /tr tr td align=center valign=toptable width=211 border=0 cellspacing=0 cellpadding=0 tr tdimg src=images/contest_top.jpg width=211 height=36 alt= //td /tr tr tda href=contest.phpimg src=images/contest_middle.jpg width=211 height=169 border=0 alt= //a/td /tr /table/td /tr tr td height=5/td /tr tr td align=center valign=toptable width=211 border=0 cellspacing=0 cellpadding=0 tr tdimg src=images/review_head.jpg width=211 height=36 alt= //td /tr tr td height=89 align=center class=reviewbgtable width=85% border=0
Re: [PHP] PhP and Java login trouble
Brad Sumrall wrote: I have been hunting all around that website you referred me too looking for javascripting information and can find nothing. I know a little bit of php but little to nothing about javascripting. I have been beating my head against the wall on this one for weeks now, I am so close! Not sure what link Chris gave you, but it looks like you are 'borrowing' code without understanding how it works. Never a good idea http://www.webreference.com/programming/javascript/diaries/1/ is worth a read but I could not find a quick - validate form - example at short notice. Actually http://www.webdevelopersjournal.com/articles/jscript_forms1.html just popped up Just google for 'javascript validate form' Firstly always CC the list - others can provide help and suggestions too. Brad - You have to remember that 'reply' on some email lists will only give you the sender - not the list ;) Yep it's a pain when every other list works differently - but that is another pointless discussion :( Bottom posting helps as well - this bit should be first. -- Lester Caine - G8HFL - Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://home.lsces.co.uk MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/ Firebird Foundation Inc. - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PhP and Java login trouble
I have been hunting all around that website you referred me too looking for javascripting information and can find nothing. I know a little bit of php but little to nothing about javascripting. I have been beating my head against the wall on this one for weeks now, I am so close! Brad -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 10:58 PM To: Brad Sumrall Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PhP and Java login trouble Firstly always CC the list - others can provide help and suggestions too. Brad Sumrall wrote: Any chance you can tell me what I am doing wrong? Brad ?php if(!isset($_SESSION[userid])) { ? form action=/phpbb/login.php method=post target=_top onsubmit=return BBValidateLogin(); You don't have a javascript function called 'BBValidateLogin'. You have one called validateLogin which references completely different form fields. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP and Java login trouble
Brad Sumrall wrote: I have been hunting all around that website you referred me too looking for javascripting information and can find nothing. I know a little bit of php but little to nothing about javascripting. Eh? I never sent you to a website. See this code: function validatelogin() { if(document.frmlogin.txtusername.value==) { alert(Please Enter Username.); document.frmlogin.txtusername.focus(); return false; } if(document.frmlogin.txtpwd.value==) { alert(Please Enter Password.); document.frmlogin.txtpwd.focus(); return false; } document.frmlogin.login.value=Success; document.frmlogin.action=operation.php?mode=login; return true; } You need to create a *similar* function (eg 'BBValidateLogin()') to check different html field names. For example: function BBValidateLogin() { var f = document.forms[0]; alert('username is ' + f.username.value); } The username.value comes from this: input type=text class=post name=username size=25 maxlength=40 value= / where you have name=username So take the name=... and put a .value on the end. Rinse, repeat until you have checked all of the fields you need to. Return true for the form to submit. Return false for it to NOT submit. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP and Java login trouble
I agree with Chris, if you can do it this way, then it's much better. Working with FCKEditor's code was not one of the easiest things I did in my life. -- itoctopus - http://www.itoctopus.com Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Brad Sumrall wrote: I am trying to create a commonlogin.php which would perform a duel login for phpbb and a java based FCKEditor combined I have working code for each as an individual but not a clue how to combine them. Does anyone have any suggestion on where I can go for information about this? Firstly that's javaSCRIPT not java. Java is an entirely different beast. Why not just copy the validateLogin javascript functionality and put it in a new function and then: form action=/phpbb/login.php method=post target=_top onsubmit=return BBValidateLogin(); -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PhP and Java login trouble
I have a question about your suggestion. Would it not be easier to simply carry the sessionid from the php session validation to the javascript? Instead of: if(document.frmlogin.txtusername.value==) { alert(Please Enter Username.); document.frmlogin.txtusername.focus(); return false; Why would I want to re-enter the user name? My common sense which maybe completely wrong say, YOU ARE VALIDATED IN PHPBB via issetid, now post to (document.frmlogin.userid.value==) This is why I am not catching your angle. PhP makes so much more sense. This javascript integration is really giving me a headache! Suggestions? Brad -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 2:16 AM To: Brad Sumrall Cc: php-general@lists.php.net Subject: Re: [PHP] PhP and Java login trouble Brad Sumrall wrote: I have been hunting all around that website you referred me too looking for javascripting information and can find nothing. I know a little bit of php but little to nothing about javascripting. Eh? I never sent you to a website. See this code: function validatelogin() { if(document.frmlogin.txtusername.value==) { alert(Please Enter Username.); document.frmlogin.txtusername.focus(); return false; } if(document.frmlogin.txtpwd.value==) { alert(Please Enter Password.); document.frmlogin.txtpwd.focus(); return false; } document.frmlogin.login.value=Success; document.frmlogin.action=operation.php?mode=login; return true; } You need to create a *similar* function (eg 'BBValidateLogin()') to check different html field names. For example: function BBValidateLogin() { var f = document.forms[0]; alert('username is ' + f.username.value); } The username.value comes from this: input type=text class=post name=username size=25 maxlength=40 value= / where you have name=username So take the name=... and put a .value on the end. Rinse, repeat until you have checked all of the fields you need to. Return true for the form to submit. Return false for it to NOT submit. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP and Java login trouble
Brad Sumrall wrote: I am trying to create a commonlogin.php which would perform a duel login for phpbb and a java based FCKEditor combined I have working code for each as an individual but not a clue how to combine them. Does anyone have any suggestion on where I can go for information about this? Firstly that's javaSCRIPT not java. Java is an entirely different beast. Why not just copy the validateLogin javascript functionality and put it in a new function and then: form action=/phpbb/login.php method=post target=_top onsubmit=return BBValidateLogin(); -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP and Java login trouble
Firstly always CC the list - others can provide help and suggestions too. Brad Sumrall wrote: Any chance you can tell me what I am doing wrong? Brad ?php if(!isset($_SESSION[userid])) { ? form action=/phpbb/login.php method=post target=_top onsubmit=return BBValidateLogin(); You don't have a javascript function called 'BBValidateLogin'. You have one called validateLogin which references completely different form fields. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php vs java....
On Sun, 2 Jan 2005 21:48:01 -0500, GH [EMAIL PROTECTED] wrote: Can you please explain Threads to me? Multiple isolated tasks executing at the same time. -- Greg Donald Zend Certified Engineer http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php vs java....
Perhaps in specific areas related to the web. But Java is so much more extensive than PHP, I doubt PHP will ever eclipse it. On Jan 1, 2005, at 1:07 PM, Lewis LaCook wrote: ...just looking for opinions: will PHP eclipse (IS PHP eclipsing) Java? bliss lewis lacook = *** Lewis LaCook --Poet-Programmer|||http://www.lewislacook.com/||| Web Programmer|||http://www.corporatepa.com/||| XanaxPop:Mobile Poem Blog- http://www.lewislacook.com/xanaxpop/ Collective Writing Projects-- The Wiki-- http://www.lewislacook.com/wiki/ Appendix M -http://www.lewislacook.com/AppendixM/ __ Do you Yahoo!? Send holiday email and support a worthy cause. Do good. http://celebrity.mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php vs java....
GH wrote: Can you please explain Threads to me? Well, you start with some sheep... :-) Real Answer: [with gross simplifiations and outright lies to keep things easy] Imagine that you have a program that wants to SEEM to be doing multiple things at once. For example, it wants to have a background window downloading and checking email with a nice progress bar, while in the front window, you are reading your email, deleting the junk, writing email, etc but *NOT* waiting for the download to finish. So, in essence, your program has two little separate programs running inside of it, even though it's really really only one program. Those two little programs are called threads And once you can have two threads, there ain't nothing to stop you from having three, four, or a hundred threads... In theory. You're going to run out of system resources like RAM and stuff at some point. Now, on the plus side, that makes it possible to do certain things that were not feasible before. Like having two things going on at once On the downside, there is some overhead for each thread just to run. And really really only *ONE* thread can be truly running on the processor at any given time. Multiple CPUs increase the number of threads that can run, at least in theory, but you can only run one thread at one time in one processor. So a Xeon Quad could have four truly simultaneous threads going at one time, all from the same program. The bigger downside is that writing good threads that don't step on each others' toes is REALLY REALLY REALLY REALLY REALLY REALLY HARD. They add huge major complexities to your code base, because EVERY line of code in thread A has to worry about what it *MIGHT* do that *MIGHT* screw up the code in thread B. So, take the number of lines in your program, times the number of lines in your program, and that's the number of potential flaws you have to watch out for. :-) Threads complicate the ability to scale your application by only throwing more hardware at it (as Rasmus just said). So hard, that many (all?) PHP Core Team Members don't think adding threads is a Good Idea (tm) because the benefits are outweighed by the costs for the target audience of PHP scripters. Other languages have other features, and the language designers have made informed (or not) desicions to add (or not) those features. I personally don't think PHP *needs* threads, and it would complicate far too many things if they were added -- certainly they shouldn't just be on automatically so PHP scripters can start making threads willy-nilly! That way lies madness. You'd have a zillion BAD scripts out there using threads in wildly inappropriate situations. I suppose that a 'thread' extension could be added, at least in theory... By all means, those of you who want such a feature are free to start coding :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php vs java....
Can you please explain Threads to me? On Sat, 1 Jan 2005 14:38:50 -0600, Greg Donald [EMAIL PROTECTED] wrote: On Sat, 1 Jan 2005 10:07:20 -0800 (PST), Lewis LaCook [EMAIL PROTECTED] wrote: ...just looking for opinions: will PHP eclipse (IS PHP eclipsing) Java? I'd like to see threads added to PHP. Java has them, and Perl does as well. And I'm sure there are others that I don't know about. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php vs java....
...just looking for opinions: will PHP eclipse (IS PHP eclipsing) Java? bliss lewis lacook = *** Lewis LaCook --Poet-Programmer|||http://www.lewislacook.com/||| Web Programmer|||http://www.corporatepa.com/||| XanaxPop:Mobile Poem Blog- http://www.lewislacook.com/xanaxpop/ Collective Writing Projects-- The Wiki-- http://www.lewislacook.com/wiki/ Appendix M -http://www.lewislacook.com/AppendixM/ __ Do you Yahoo!? Send holiday email and support a worthy cause. Do good. http://celebrity.mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php vs java....
On Sat, 1 Jan 2005 10:07:20 -0800 (PST), Lewis LaCook [EMAIL PROTECTED] wrote: ...just looking for opinions: will PHP eclipse (IS PHP eclipsing) Java? I'd like to see threads added to PHP. Java has them, and Perl does as well. And I'm sure there are others that I don't know about. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs. Java
Any comments or opinions on pros and cons, especially in terms of stability, security, and future upgradability? I know this is probably one of those religious war topics, but I'd still like your feedback. -Ed
Re: [PHP] PHP vs. Java
Ed Lazor wrote: Any comments or opinions on pros and cons, especially in terms of stability, security, and future upgradability? This is a a religious war topic. Horses for course but in this list of PHP fanatics you should expect only one answer - PHP is better for web applications - no contest when it comes to mobiles or desktop applications. I know this is probably one of those religious war topics, but I'd still like your feedback. -Ed -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and java appletsf
On Fri, May 21, 2004 at 08:16:30AM -0700, jon wrote: Nah... Maybe we're both confused. Is this a java app you wrote or one that you found somewhere? If you know how to control the camera from java and you know how to work in java, you could build yourself a quick and dirty command-line java application, then feed it commands from php using exec or something similar. Well the whole point of the java applet was to provide a nice, drag and drop interface to move the camera around. I already have a pure php version, it just doesn't look that nice and you can't drag things around. I don't think I explained myself very well. You can see the applet here: http://tom.playford.net/control/control.html It does very little at the moment. Tom Tom Playford wrote: jon wrote: Can you just send a command line java app commands from php? I'm not sure what you're getting at. Do you mean writing the Java code in the php page? I didn't know php could compile the code on the fly, can it? Or do you mean something else? Tom -- jon Tom Playford wrote: Dear all knowing list, I am trying to control the movement of a camera in real time from the web. But I also need to make sure that only the user I specify can have control. What I though I could do was this: launch a java applet from a php page parsing the session id. Then when the user adjusts the controls on the applet, a php page is loaded by the applet, sets the user session with the session id, then sends the control details back to the server and on to the camera. I've given this a go with no luck. When I try to set the session id on the php script that the Java applet loads I get a permissions error (the perms on /tmp are fine). I'm not 100% sure I understand sessions, is my method utterly implausible? Does anyone have any better suggestions? Thanks, Tom Playford . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and java applets
Dear all knowing list, I am trying to control the movement of a camera in real time from the web. But I also need to make sure that only the user I specify can have control. What I though I could do was this: launch a java applet from a php page parsing the session id. Then when the user adjusts the controls on the applet, a php page is loaded by the applet, sets the user session with the session id, then sends the control details back to the server and on to the camera. I've given this a go with no luck. When I try to set the session id on the php script that the Java applet loads I get a permissions error (the perms on /tmp are fine). I'm not 100% sure I understand sessions, is my method utterly implausible? Does anyone have any better suggestions? Thanks, Tom Playford -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and java applets
Can you just send a command line java app commands from php? -- jon Tom Playford wrote: Dear all knowing list, I am trying to control the movement of a camera in real time from the web. But I also need to make sure that only the user I specify can have control. What I though I could do was this: launch a java applet from a php page parsing the session id. Then when the user adjusts the controls on the applet, a php page is loaded by the applet, sets the user session with the session id, then sends the control details back to the server and on to the camera. I've given this a go with no luck. When I try to set the session id on the php script that the Java applet loads I get a permissions error (the perms on /tmp are fine). I'm not 100% sure I understand sessions, is my method utterly implausible? Does anyone have any better suggestions? Thanks, Tom Playford -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and java applets
jon wrote: Can you just send a command line java app commands from php? I'm not sure what you're getting at. Do you mean writing the Java code in the php page? I didn't know php could compile the code on the fly, can it? Or do you mean something else? Tom -- jon Tom Playford wrote: Dear all knowing list, I am trying to control the movement of a camera in real time from the web. But I also need to make sure that only the user I specify can have control. What I though I could do was this: launch a java applet from a php page parsing the session id. Then when the user adjusts the controls on the applet, a php page is loaded by the applet, sets the user session with the session id, then sends the control details back to the server and on to the camera. I've given this a go with no luck. When I try to set the session id on the php script that the Java applet loads I get a permissions error (the perms on /tmp are fine). I'm not 100% sure I understand sessions, is my method utterly implausible? Does anyone have any better suggestions? Thanks, Tom Playford -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and java applets
Nah... Maybe we're both confused. Is this a java app you wrote or one that you found somewhere? If you know how to control the camera from java and you know how to work in java, you could build yourself a quick and dirty command-line java application, then feed it commands from php using exec or something similar. -- jon -- jon roig web developer Tom Playford wrote: jon wrote: Can you just send a command line java app commands from php? I'm not sure what you're getting at. Do you mean writing the Java code in the php page? I didn't know php could compile the code on the fly, can it? Or do you mean something else? Tom -- jon Tom Playford wrote: Dear all knowing list, I am trying to control the movement of a camera in real time from the web. But I also need to make sure that only the user I specify can have control. What I though I could do was this: launch a java applet from a php page parsing the session id. Then when the user adjusts the controls on the applet, a php page is loaded by the applet, sets the user session with the session id, then sends the control details back to the server and on to the camera. I've given this a go with no luck. When I try to set the session id on the php script that the Java applet loads I get a permissions error (the perms on /tmp are fine). I'm not 100% sure I understand sessions, is my method utterly implausible? Does anyone have any better suggestions? Thanks, Tom Playford . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Java
Hi, I am not so sure where the problem lies with this. I have installed JDK1.3.1 on a FreeBSD 4.9 server. It seems to work fine. I have written a small java program and it compiles and runs without any issues. I want to get the PHP intgration with java working, I must admit I know more about compiling and tinkering with PHP source then java. So I have set all the right options in PHP for this intergration and got the thing to compile. in my small PHP script to test the system is this. #!/usr/local/bin/php -q ? $system_inst = new Java('java.lang.System'); echo $system_inst-getProperty(java.version); ? when this is run it produces this. PHP Fatal error: Unable to load Java Library /usr/local/jdk1.3.1/jre/lib/i386/classic/libjvm.so, error: /usr/local/jdk1.3.1/jre/lib/i386/classic/libjvm.so: Undefined symbol setFPMode in /root/test on line 3 I know the setFPmode is due to the threads in java so I have set LD_LIBRARY_PATH=/usr/local/jdk1.3.1/jre/lib/i386/green_threads Either way this problem doesn`t seem to go away with the LD references? anyone got an ideas of what I am doing wrong? Mark -- Mark Ackroyd e: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with Java extension
Hello options some of which ray has suggested. Others include soap or writing out objects using the XMLEncoder class (1.4+) and decoding them with a parser in your php. this is also a possible solution but the java system that does the processing is already written and tested, the only thing left to do is to read some values from a form and pass them to it. BEsides I have no clue about PHP and its syntax so I wouldn't want to delve too deep into it. I'd like to keep on researching the PHP to Java solution. Any more thoughts? __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with Java extension
Hi, If i understand your project correctly all you need is for the php script to do some elementary processing and pass some parameters to a jsp or servlet. If so you do not need to delve too deeply into PHP at all and i am sure learning the few functions needed to achieve this is easier than a PHP/java integration. even if you did that you still need to learn a bit of PHP. Speaking as a sun certified java programmer, i can tell you that PHP is a hell of a lot better than JSP or Servlets :-)) best regards raditha Panos Konstantinidis wrote: Hello options some of which ray has suggested. Others include soap or writing out objects using the XMLEncoder class (1.4+) and decoding them with a parser in your php. this is also a possible solution but the java system that does the processing is already written and tested, the only thing left to do is to read some values from a form and pass them to it. BEsides I have no clue about PHP and its syntax so I wouldn't want to delve too deep into it. I'd like to keep on researching the PHP to Java solution. Any more thoughts? __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with Java extension
Any ideas and recommendations are more than welcome. Try going the other waytry utilizing PHP in your servlet or j2ee server environment. I have had greater success with this then trying to get java integrated into PHP. HTH -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with Java extension
Hi, Generally integrating java and php together is not easy. There are other options some of which ray has suggested. Others include soap or writing out objects using the XMLEncoder class (1.4+) and decoding them with a parser in your php. Panos Konstantinidis wrote: Hello, I am completely new to PHP and due to some disparate components in our system I am trying to integrate PHP with Java. I have followed the instructions in the README file (under the ext/java folder in the PHP bundle) but I have hit a snag two days now. I have done several changes in my php.ini file but none of them seems to work. Apache seems to be able to find the JVM butu nfortunatelly the page does not load. With Opera 6.1 it just goes into a spastic fit and tries to connect and reconnect all the time (a problem similar to this URL: http://www.phpbuilder.com/annotate/message.php3?id=1014708.) with no error messages on the apache logs. If I use Netscape I just get the error message that the browser cannot load an empty document. If I use Mozilla it loads the page up fine but when I do view source it is an empty document (only the html and body tags are there, nothing else). I have tried every hack described on php.net and phpbuilder.com but to no avail, so you are my last hope. Any ideas and recommendations are more than welcome. Additional info: php.ini: extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20020429 extension=libphp_java.so java.class.path=/usr/local/apache/php/lib/php/php_java.jar java.home=/homa/panos/java/j2sdk1.4.0 java.library=/home/panos/java/j2sdk1.4.0/jre/lib/i386/server/libjvm.so java.library.path=/usr/local/lib/php/extensions/no-debug-non-zts-20020429 php file I am using for testing: ?php print testing...; $systemInfo = new Java(java.lang.System); print Total seconds since January 1, 1970:.$systemInfo-currentTimeMillis(); ? os: Mandrake Linux 8.1 with kernel 2.4.8-26mdk php: 4.3.1 apache: 2.0.43 java: 1.4.0 Thank you. __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP with Java extension
Hello, I am completely new to PHP and due to some disparate components in our system I am trying to integrate PHP with Java. I have followed the instructions in the README file (under the ext/java folder in the PHP bundle) but I have hit a snag two days now. I have done several changes in my php.ini file but none of them seems to work. Apache seems to be able to find the JVM butu nfortunatelly the page does not load. With Opera 6.1 it just goes into a spastic fit and tries to connect and reconnect all the time (a problem similar to this URL: http://www.phpbuilder.com/annotate/message.php3?id=1014708.) with no error messages on the apache logs. If I use Netscape I just get the error message that the browser cannot load an empty document. If I use Mozilla it loads the page up fine but when I do view source it is an empty document (only the html and body tags are there, nothing else). I have tried every hack described on php.net and phpbuilder.com but to no avail, so you are my last hope. Any ideas and recommendations are more than welcome. Additional info: php.ini: extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20020429 extension=libphp_java.so java.class.path=/usr/local/apache/php/lib/php/php_java.jar java.home=/homa/panos/java/j2sdk1.4.0 java.library=/home/panos/java/j2sdk1.4.0/jre/lib/i386/server/libjvm.so java.library.path=/usr/local/lib/php/extensions/no-debug-non-zts-20020429 php file I am using for testing: ?php print testing...; $systemInfo = new Java(java.lang.System); print Total seconds since January 1, 1970:.$systemInfo-currentTimeMillis(); ? os: Mandrake Linux 8.1 with kernel 2.4.8-26mdk php: 4.3.1 apache: 2.0.43 java: 1.4.0 Thank you. __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and java
Ok, First, let me say, I have looked at the manual and searched the past posts but still can't get this to work. I also should say that this is my first time trying to bridge php and java so this may be a stupid questionI have a java class(DateUtil) in a package (testphp). I then took the package and created a jar file from it and put the location of the jar file in my php.ini file with the java settings. In my php code, this code works fine: $java = new Java(testphp); $currentTime=$java-currentTimeMillis(); echo The Time is:. $currentTime; but if I try to access my class, I get errors that it can't instantiate non-existent class: $mydate=new DateUtil(testphp); Am I doing something blatantly wrong? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and java
On Wed, 29 Oct 2003 19:27:36 -0600 David Miller [EMAIL PROTECTED] wrote: I have written PHP code to upload and download files to my server through my browser. On the local side I have generated a java applet to do a few things that I just can't do with a browser. There are some things that I need the java on the local machine to have access to on the server. I started to generate a java servlet to do this when I found out that my service provider doesn't support servlets. For example, I need for the java to be able to make a request of the server for a directory listing, then fetch an image from the directory to display in the applet. I am a little new to java applets. Any ideas on how to do this? Hmm... maybe you can try asking on a Java list or just find a provider the supports servlets ;) - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and java
Why can't you do this using PHP? Have a php script generate a directory listing the user can choose from and when the user chooses a picture load that picture. Jacob On Thu, 2003-10-30 at 02:27, David Miller wrote: I have written PHP code to upload and download files to my server through my browser. On the local side I have generated a java applet to do a few things that I just can't do with a browser. There are some things that I need the java on the local machine to have access to on the server. I started to generate a java servlet to do this when I found out that my service provider doesn't support servlets. For example, I need for the java to be able to make a request of the server for a directory listing, then fetch an image from the directory to display in the applet. I am a little new to java applets. Any ideas on how to do this? JDM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Tuborg Boulevard 12 2900 Hellerup Denmark Phone: +45 36 94 41 66 Mobile: +45 61 68 58 51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and java
I have written PHP code to upload and download files to my server through my browser. On the local side I have generated a java applet to do a few things that I just can't do with a browser. There are some things that I need the java on the local machine to have access to on the server. I started to generate a java servlet to do this when I found out that my service provider doesn't support servlets. For example, I need for the java to be able to make a request of the server for a directory listing, then fetch an image from the directory to display in the applet. I am a little new to java applets. Any ideas on how to do this? JDM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and JAVA
Hello all, I would like to know if there is a possibility in php to invoke JAVA RMI from php by enabling some options in php in php.ini file. If there is a possibility please let me know, where I can get a document about it. If any one of you have tried this then please send me a sample and steps involved in it, so that I can start experimenting on it further. I'am in a urgent, I request you to help me as soon a possible. Thanks in advance cheers, - JFK kishor Nilgiri Networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and JAVA
Have you tried looking at http://www.php.net/java ? J.F.Kishor wrote: Hello all, I would like to know if there is a possibility in php to invoke JAVA RMI from php by enabling some options in php in php.ini file. If there is a possibility please let me know, where I can get a document about it. If any one of you have tried this then please send me a sample and steps involved in it, so that I can start experimenting on it further. I'am in a urgent, I request you to help me as soon a possible. Thanks in advance cheers, - JFK kishor Nilgiri Networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Timer + Java
At 22:28 11.11.2002, Mohsin Rahman said: [snip] 1) How to pass the STARTTIME only when the START TASK button is pressed? Apprently using echo input type=button value=\Start\ onclick=\window.open('popup.html?clientid=$starttime=strtotime(\now\)$th isclientidprojectid=$thisclientid','TEST','height=200,width=300,resizable=y es,toolbar=no,status=no,menubar=no,scrollbars=no')\; does not pass the unixtime (now) to the popup. You're merging the function call strtotime() into a string - that won't work. The other query parameters seem also not to be correctly identified. Try this: $starttime = =strtotime('now'); $uri = 'popup.html?' . clientid=$thisclientid . projectid=$thisprojectid . starttime=$starttime; echo 'input type=button value=Start', 'onclick=window.open(\'', $uri, '\',\'TEST\',', '\'height=200,width=300,resizable=yes,toolbar=no,', 'status=no,menubar=no,scrollbars=no\')'; 2). Since this is a Java popup, how do I get the close form action back and insert my endtime into the database from the popup? I don't know - this depends on how the Java applet is written. Basically it should issue a request to an URI passing either the time, or the elapsed time, as a parameter. Caution - this would pass the time at the client workstation which might differ considerably from the server time. I'd suggest a solution where the server generates some kind of client token that's passed to the Java applet. The server would then associate this token with what he knows as project start time. Upon hitting the stop button at the client's the applet would just pass back this token, annotated by the action (stop, reset, cancel, whatever). The server would then have a chance to take the appropriate action. 3). How do I mix php in a Java function? You don't. PHP is a server side issue, Java runs at the client's (at least in this scenario). The client browser starts the Java applet on behalf of the HTML code your server-side application outputs. The Java applet can only communicate with the server using URI requests. -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Timer + Java
OK.. probably a easy thing, but I am complicating it too much. Here is what I am trying to accomplish. Using PHP4.0.2 and PostgreSQL 7.1. I am creating a time tracking system where a user, based on their login, gets a list of open projects. I have clientid, projectid, description, estimate time, and actual time spent on the project. it is the Actual Time data that I am trying to collect. I give the user a list of all their tasks, and want them to click a FORM BUTTON (can be anything as long as it accomplishes what I am doing) that passes variables like clientid, projectid, startime, description to the popup. What I want to do is use that popup window to show how much time they have spent since the click on START TASK form button is pressed. I then want to show them a running time starting from 00:00:00 upwards. Sort of like a stopwatch. The popup has a STOP/CLOSE link that, when pressed, will update the database with the unixtime stamp of the start and end of the project. I have the 00:00:00 counter going no problem, but the problem I run into: 1) How to pass the STARTTIME only when the START TASK button is pressed? Apprently using echo input type=button value=\Start\ onclick=\window.open('popup.html?clientid=$starttime=strtotime(\now\)$thisclientidprojectid=$thisclientid','TEST','height=200,width=300,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=no')\; does not pass the unixtime (now) to the popup. 2). Since this is a Java popup, how do I get the close form action back and insert my endtime into the database from the popup? 3). How do I mix php in a Java function? Any help and pointers appreciated. Thanks. Mohsin Rahman [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP AND JAVA
may i use php with JAVA (note. not JAVASCRIPT , but JAVA APPLETS) !?! any helps !? thx xanda
Re: [PHP] PHP vs. Java
ðÒÉ×ÅÔ! IMHO java is to be avoided. fullstop. Still, it might be unavoidable from a commercial point of view. In that case, you should avoid being involved in the project and let the marketing dept have their fun on their own. There's a lot of pleasantly paid jobs that won't kill your nerves on this planet. Whatever you say now *you* will be responsible for it. So keep away from suicidal attempts. Java *may* properly work (but it will never work half as fast as PHP will) but you are not going to find an adequate number of skilled resources to make that happen. And when your unproper underpaid resources will turn your java soup into a slw boiling mess, guess who will pay for that? Got a mirror home? :) I saw a project based on IBM San Francisco last ONE YEAR before being thrown out of the window (along with its manager). The best result of the project was in that it could query a table of 500 rows in only... 45 seconds. New olympic record. And no, I was not the manager. My spider sense told me to keep well away from it :) ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ× -_=}{=_-@-_=}{=_--_=}{=_-@-_=}{=_--_=}{=_-@-_=}{=_--_=}{=_- LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
AW: [PHP] PHP vs. Java
I agree with the other reply to your question. (Keep in mind that it will be easier to sell Java to the corporate guys. Some executives shy away from open source.) Php vs. Java? Why not work together. copy from manual: There are two possible ways to bridge PHP and Java: you can either integrate PHP into a Java Servlet environment, which is the more stable and efficient solution, or integrate Java support into PHP. The former is provided by a SAPI module that interfaces with the Servlet server, the latter by the Java extension. PHP 4 ext/java provides a simple and effective means for creating and invoking methods on Java objects from PHP. The JVM is created using JNI, and everything runs in-process. Build instructions for ext/java can be found in php4/ext/java/README. Good luck!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs. Java
I'm being asked you evaluate a fairly complex web project using the MS SQL Server 2000 back-end. A large application will be built, involving lots of technical and financial information from multiple sources and types of sources input daily, weekly, monthly, etc. Reports will also be run daily, weekly, monthly, etc., against this data. All the data including input, views and reports has to work well with a standard web browser client, although some of the reports will be emailed to clients who use Blackberry PDAs. I'd rather take more time with the specifics before committing to a single technology but the client is asking which technology we'd propose before they award the job. At this point I'm leaning towards PHP as the solution (although to CIOs, I'm sure 'Java' is still a sexier word than 'PHP'), but I'd like to ask for general opinions on the value of PHP vs. Java (specifically Apache Struts-type J2EE applications) for this kind of web-enabled application. Thanks very much in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs. Java
[snip] I'm being asked you evaluate a fairly complex web project using the MS SQL Server 2000 back-end. A large application will be built, involving lots of technical and financial information from multiple sources and types of sources input daily, weekly, monthly, etc. Reports will also be run daily, weekly, monthly, etc., against this data. All the data including input, views and reports has to work well with a standard web browser client, although some of the reports will be emailed to clients who use Blackberry PDAs. I'd rather take more time with the specifics before committing to a single technology but the client is asking which technology we'd propose before they award the job. At this point I'm leaning towards PHP as the solution (although to CIOs, I'm sure 'Java' is still a sexier word than 'PHP'), but I'd like to ask for general opinions on the value of PHP vs. Java (specifically Apache Struts-type J2EE applications) for this kind of web-enabled application. [/snip] I am not going to go at this from a JAVA vs. PHP viewpoint as each have strengths in certain applications. What I will do is evangelize about PHP for the application you describe. We regularly use PHP for Enterprise Level applications for a number of reasons including development time, application speed, modularity, cross-platform stability, usability in many situations (for instance, we have many PHP functions that run as standalone scripts or in conjunction with other shell scripting languages that can be called from timed events, such as those found in CRON jobs and other command line executions). I will give you an instance; Retrieve files from remote location each day, Extract needed files each day, Parse files, Import parsed files into database, Do multiple reports in multiple versions (Excel, HTML, PDF, etc), Request needed files from database, Put those files into usable form for billing application, Forward those files to the appropriate location for billing. Eventually we will move our entire billing, customer service, aging and collection information to a PHP application(s) running in a set of web-interfaces...replacing legacy software, some of which still runs as a DOS application. PHP is a terrific solution for developing such a large scale application as modules can be added to the application either singularly or in groups to add needed functionality to the overall application without compromising other modules utilizing the same data. We receive millions of records each week that are handled by the PHP applications, it has the needed horsepower. From a testing and approval standpoint it allows the cycle to be shortened from conception to production, a very good thing. Errors can be quickly found and corrected while new functionality does not require rewriting tons of code. If you plan carefully each module can remain independent enough from other modules, allowing modules to be added or depricated without affect the performance of other modules. Sound database planning is also key to this. As for the PDA's PHP plays well with XSLT, CSS, and any other formatting tool that you can think of to deliver reports. The same report data can be formatted by PHP using these tools for many different interfaces (again, modularity). PHP, to my way of thinking, is easier to maintain for others who may have to come in contact with your code after you have gone down the road to another project. It is well documented and features tons of extensions that can be added to the core for increased functionality (i.e. http://www.phpclasses.org/mirrors.html?page=%2Findex.html). And finally, you can use JAVA with PHP should the need arise, therefore not locking yourself into a particualr technology and allowing you to flex the strengths of appropriate technologies for appropriate tasks. My .02¢ Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs. Java
I agree with the other reply to your question. My thoughts could be summarized as follows: - Java solution would be more expensive and involved to build and maintain. - PHP would be cheaper and quicker to build and maintain. - Java would require more resources on your server. - PHP is light weight and fast. - Java is a mature OO language. So, if designed properly, would be easier to modify and/or extend functionality. - In my opinion, PHP is not a mature OO language. It might get there sometime in the future. However, PHP is very well suited for the goals it was designed for. My choice would be Java. (Keep in mind that it will be easier to sell Java to the corporate guys. Some executives shy away from open source.) Good luck!!! --- [EMAIL PROTECTED] wrote: I'm being asked you evaluate a fairly complex web project using the MS SQL Server 2000 back-end. A large application will be built, involving lots of technical and financial information from multiple sources and types of sources input daily, weekly, monthly, etc. Reports will also be run daily, weekly, monthly, etc., against this data. All the data including input, views and reports has to work well with a standard web browser client, although some of the reports will be emailed to clients who use Blackberry PDAs. I'd rather take more time with the specifics before committing to a single technology but the client is asking which technology we'd propose before they award the job. At this point I'm leaning towards PHP as the solution (although to CIOs, I'm sure 'Java' is still a sexier word than 'PHP'), but I'd like to ask for general opinions on the value of PHP vs. Java (specifically Apache Struts-type J2EE applications) for this kind of web-enabled application. Thanks very much in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP --with-java problem
I am trying to configue PHP with Java support. with PHP-4.1.2, JDK1.3.1_01 The installation goes smoothly. My php.ini file contains the follwing section for Java code [Java] java.class.path = /usr/local/src/php-4.1.2/ext/java/php_java.jar java.home = /usr/local/jdk1.3.1_01 java.library = /usr/local/jdk1.3.1_01/jre/lib/i386/server/libjvm.so ;java.library.path = .\ extension_dir = /usr/lib/php4 extension = libphp_java.so /code phpinfo() function output shows me Java section OK. BUT, when I run a simple example from 'ext/java/jver.php' (available with PHP distribution), Netscape gives me an error box with a message: The document contained no data. Try again later or contact the server's administrator. Here's the code for jver.php I'm trying to run: html headtitletest/title/head body h1Java Test/h1 ? // if this part is commented out --- // // the scritp displays h1Java Test/h1 $system = new Java(java.lang.System); print Java version=.$system-getProperty(java.version). br\n; print Java vendor=.$system-getProperty(java.vendor). p\n\n; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br\n; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)).\n; // - */ ? body /html Obviously, there's somthing still wrong with PHP/Java configuration Anybody has the same problem? Any suggestions? Any help is appreciated, Thanks -- zakd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Java Servlets
I have to build a bridge page from my PHP script that does the following: 1. Kick off a Java servlet (in my case running on my Tomcat4 plug-in to Apache) 2. Receive data back from that servlet and continue my PHP script. Does anyone have hard won advice, tips on great articles, examples, etc? TIA, Rich
[PHP] PHP and Java
I have Java1.2 , php4.1.1 and apache 1.3.22, sun solaris7 I did compile php with-java 1) Java section in php.ini [Java] java.home = /usr/java1.2 java.class.path = /usr/local/lib/php/php_java.jar java.library=/usr/java1.2/jre/lib/sparc/libjvm.so java.library.path = /usr/local/lib/php 2) prueba.php html body ? $system = new Java(); print Java version=.$system-getProperty(java.version). br\n; print Java vendor=.$system-getProperty(java.vendor). p\n\n; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br\n; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)).\n; ? html the error in browser is: Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 3) when I run apache in error.log PHP Warning: Unable to load dynamic library './libphp_java.so' - ld.so.1: /usr/ local/apache/bin/httpd: fatal: ./libphp_java.so: open failed: No such file or directory in Unknown on line 0 [Fri Mar 1 12:06:01 2002] [notice] Apache/1.3.22 (Unix) PHP/4.1.1 configured -- resuming normal operations [Fri Mar 1 12:06:01 2002] [notice] Accept mutex: fcntl (Default: fcntl) : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP and Java
Is the libphp_java.so located in your apache libexec directory? Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and Java I have Java1.2 , php4.1.1 and apache 1.3.22, sun solaris7 I did compile php with-java 1) Java section in php.ini [Java] java.home = /usr/java1.2 java.class.path = /usr/local/lib/php/php_java.jar java.library=/usr/java1.2/jre/lib/sparc/libjvm.so java.library.path = /usr/local/lib/php 2) prueba.php html body ? $system = new Java(); print Java version=.$system-getProperty(java.version). br\n; print Java vendor=.$system-getProperty(java.vendor). p\n\n; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br\n; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)).\n; ? html the error in browser is: Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 3) when I run apache in error.log PHP Warning: Unable to load dynamic library './libphp_java.so' - ld.so.1: /usr/ local/apache/bin/httpd: fatal: ./libphp_java.so: open failed: No such file or directory in Unknown on line 0 [Fri Mar 1 12:06:01 2002] [notice] Apache/1.3.22 (Unix) PHP/4.1.1 configured -- resuming normal operations [Fri Mar 1 12:06:01 2002] [notice] Accept mutex: fcntl (Default: fcntl) : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP and Java
no, it isn't. it is in usr/local/lib/php/modules Is the libphp_java.so located in your apache libexec directory? Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and Java I have Java1.2 , php4.1.1 and apache 1.3.22, sun solaris7 I did compile php with-java 1) Java section in php.ini [Java] java.home = /usr/java1.2 java.class.path = /usr/local/lib/php/php_java.jar java.library=/usr/java1.2/jre/lib/sparc/libjvm.so java.library.path = /usr/local/lib/php 2) prueba.php html body ? $system = new Java(); print Java version=.$system-getProperty(java.version). br\n; print Java vendor=.$system-getProperty(java.vendor). p\n\n; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br\n; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)).\n; ? html the error in browser is: Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 3) when I run apache in error.log PHP Warning: Unable to load dynamic library './libphp_java.so' - ld.so.1: /usr/ local/apache/bin/httpd: fatal: ./libphp_java.so: open failed: No such file or directory in Unknown on line 0 [Fri Mar 1 12:06:01 2002] [notice] Apache/1.3.22 (Unix) PHP/4.1.1 configured -- resuming normal operations [Fri Mar 1 12:06:01 2002] [notice] Accept mutex: fcntl (Default: fcntl) : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP and Java
If you are running this on apache then it needs to be in the libexec directory of apache where it looks for the *.so modules that are to be loaded. Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 10:56 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] PHP and Java no, it isn't. it is in usr/local/lib/php/modules Is the libphp_java.so located in your apache libexec directory? Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and Java I have Java1.2 , php4.1.1 and apache 1.3.22, sun solaris7 I did compile php with-java 1) Java section in php.ini [Java] java.home = /usr/java1.2 java.class.path = /usr/local/lib/php/php_java.jar java.library=/usr/java1.2/jre/lib/sparc/libjvm.so java.library.path = /usr/local/lib/php 2) prueba.php html body ? $system = new Java(); print Java version=.$system-getProperty(java.version). br\n; print Java vendor=.$system-getProperty(java.vendor). p\n\n; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br\n; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)).\n; ? html the error in browser is: Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 3) when I run apache in error.log PHP Warning: Unable to load dynamic library './libphp_java.so' - ld.so.1: /usr/ local/apache/bin/httpd: fatal: ./libphp_java.so: open failed: No such file or directory in Unknown on line 0 [Fri Mar 1 12:06:01 2002] [notice] Apache/1.3.22 (Unix) PHP/4.1.1 configured -- resuming normal operations [Fri Mar 1 12:06:01 2002] [notice] Accept mutex: fcntl (Default: fcntl) : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Java
From my experience getting Java to run w/ PHP and Apache on RedHat 70, you can try setting the LD_LIBRARY_PATH environment variable ( without which my Java would not run) set to the location of libjavaso, libjvmso, and php_javajar, in my case (without line feeds) LD_LIBRARY_PATH=/usr/java/j2sdk140/jre/lib/i386: /usr/java/j2sdk140/jre/lib/i386/server:/usr/local/lib/php Rich -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
Re: [PHP] PHP and Java
Minor point, but you do mean LD_LIBRARY_PATH, not LD_LIBRARYPATH right? Also, set [Java] extension = libphp_javaso extension_dir = (pathname to libphp_javaso) Rich -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
[PHP] PHP vs Java reliability
Hi folks Just putting together a brochure for a product authored in PHP, and making the case for LAMP (Linux/Apache/MySQL/PHP) as a platform, in a market where most competitors are Java based. I recently spoke to a very experienced sysadmin at an ISP who said they always recommend LAMP over Java because even after extensive tuning they had never got their Java servelet/bean platform as reliable as their PHP and Perl setups on both shared and dedicated servers. Has anyone else on the list got experience of this? Is PHP notably more reliable than Java in production situations? Geoff Caplan Advantae Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]