Re: [PHP] Re: PHP vs JAVA
2013/8/22 David Harkness davi...@highgearmedia.com On Wed, Aug 21, 2013 at 7:56 PM, Curtis Maurand cur...@maurand.comwrote: Sebastian Krebs wrote: Actually the problem is, that the dot . is already in use. With $foo.bar() you cannot tell, if you want to call the method bar() on the object $foo, or if you want to concatenate the value of $foo to the result of the function bar(). There is no other way around this than a different operator for method calls. I didn't think of that. It seems to me there could be an easier operator than - which sometimes will make me stop and look at what keys I'm trying to hit. Just a thought. I forgot about the concatenation operator which is + in Java/C# The PHP language developers were pretty stuck. Because of automatic string-to-numeric-conversion, they couldn't use + for string concatenation. Sadly, they chose . rather than .. which I believe one or two other languages use. If they had, . would have been available once objects rolled around in PHP 4/5. I suspect they chose - since that's used in C and C++ to dereference a pointer. Actually I think .. is quite error-prone, because it is hard to distinguish from . or _ on the _first_ glance, which makes the get quickly through the code. [1] So . is maybe not the best choice, but also remember when it was introduced: That was decades ago. That time it was (probably ;)) the best choice and nowadays I don't think it is too bad at all, beside that _other_ languages use it for other purposes now ;) [1] Yes, I know, that _ is not an operator, but mixed with strings and variables names it is there ;) Ever tried the jetbrains products? :D (No, they don't pay me) I have not, but it looks interesting. I'll have to try it. Those are very good products which have had a strong following for a decade. The free IDE NetBeans also has quite good support for both Java and PHP, and the latest beta version provides a web project that provides front- and back-end debugging of PHP + JavaScript. You can be stepping through JS code and hit an AJAX call and then seamlessly step through the PHP code that handles it. I use NetBeans for PHP/HTML/JS (though I am evaluating JetBrains' PHPStorm now) and Eclipse for Java. You can't beat Eclipse's refactoring support in a free tool, though I think NetBeans is close to catching up. I would bet IntelliJ IDEA for Java by JetBrains is on par at least. Eclipse' code-completion and debugger never worked for me well (and most of the time: at all). It became slower and less responsive with every release. That was the reason I decided to leave it and I don't regret it :) Peace, David -- github.com/KingCrunch
Re: [PHP] Re: PHP vs JAVA
On Thu, Aug 22, 2013 at 12:29 AM, Sebastian Krebs krebs@gmail.comwrote: Actually I think .. is quite error-prone, because it is hard to distinguish from . or _ on the _first_ glance, which makes the get quickly through the code. [1] I surround all operators except member access (. and -) with spaces, so that wouldn't be a problem for me. I thought there was an older language that used .., but all I can find now is Lua which was developed in the early nineties. So . is maybe not the best choice, but also remember when it was introduced: That was decades ago. That time it was (probably ;)) the best choice and nowadays I don't think it is too bad at all, beside that _other_ languages use it for other purposes now ;) C introduced . as the field access operator for structs in the early seventies, C++ kept it for object access, and Java adopted it in the early nineties. C's use of pointers required a way to access members through a pointer, and I suppose KR thought - looked like following a pointer (I agree). Since PHP was modeled on Perl and wouldn't implement objects or structs for another decade, it adopted . for string concatenation. It works fine, and I don't have too much trouble bouncing back-and-forth. I honestly would have preferred . to be overloaded when the left hand side was an object. In the rare cases that you want to convert an object to a string to be concatenated with the RHS, you can always cast it to string, use strval(), or call __toString() manually. But I'm not staging any protests over the use of -. :) Eclipse' code-completion and debugger never worked for me well (and most of the time: at all). It became slower and less responsive with every release. That was the reason I decided to leave it and I don't regret it :) I agree about the slowness, and until this latest release I've always left autocompletion manual (ctrl + space). They did something with Kepler to speed it up drastically, so much so I have it turned on with every keypress. However, it's a little too aggressive in providing choices. Typing null which is a Java keyword as in PHP, it will insert nullValue() which is a method from Hamcrest. :( After a couple weeks of this, I think I'll be switching it back to manual activation. I can type quickly enough that I only need it when I'm not sure of a method name. NetBeans, while not as good with refactoring and plugin support, is still zippier than Eclipse. And my short time with the JetBrains products found them to be fast as well. Eclipse's PHP support via PDT is not nearly as good as NetBeans, and no doubt PHPStorm beats them both. Peace, David
[PHP] Re: PHP vs JAVA
On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 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. To me the salient point is, does java has as extensive a library or set of interfaces to other packages (such as SQLite, mysql, etc)? 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. Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down its nose at PHP. There being lots of courses proves nothing in and of itself. 20 years ago, there were lots of PC mags you could buy, which caused some folks to say look how much better the PC is supported than other platforms. Truth was, at the time, such support was needed given the mess of 640k limits, DOS, IRQs and the like, most of which issues have ceased to be relevant. Anyway, why should one need a course to learn PHP, assuming you already know other languages. It's simple enough. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP vs JAVA
Hi, my I shake the subject a little; Ive been doing some PHP and found it ok to work with not so much fuss, but that was PHP4, what about PHP5 ? Dont really checked the difference but made a short-scan and found that it had be screwed around with ? Any think, should I change to 5 ? BR georg - Original Message - From: Tim Streater t...@clothears.org.uk To: PHP List phpl...@arashidigital.com; php-general@lists.php.net Sent: Wednesday, August 21, 2013 1:59 PM Subject: [PHP] Re: PHP vs JAVA On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 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. To me the salient point is, does java has as extensive a library or set of interfaces to other packages (such as SQLite, mysql, etc)? 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. Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down its nose at PHP. There being lots of courses proves nothing in and of itself. 20 years ago, there were lots of PC mags you could buy, which caused some folks to say look how much better the PC is supported than other platforms. Truth was, at the time, such support was needed given the mess of 640k limits, DOS, IRQs and the like, most of which issues have ceased to be relevant. Anyway, why should one need a course to learn PHP, assuming you already know other languages. It's simple enough. -- Cheers -- Tim -- 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] Re: PHP vs JAVA
2013/8/21 georg chambert georg.chamb...@telia.com Hi, my I shake the subject a little; Ive been doing some PHP and found it ok to work with not so much fuss, but that was PHP4, what about PHP5 ? Dont really checked the difference but made a short-scan and found that it had be screwed around with ? Any think, should I change to 5 ? ehm ... serious? http://php.net/eol.php BR georg - Original Message - From: Tim Streater t...@clothears.org.uk To: PHP List phpl...@arashidigital.com; php-general@lists.php.net Sent: Wednesday, August 21, 2013 1:59 PM Subject: [PHP] Re: PHP vs JAVA On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 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. To me the salient point is, does java has as extensive a library or set of interfaces to other packages (such as SQLite, mysql, etc)? 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. Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down its nose at PHP. There being lots of courses proves nothing in and of itself. 20 years ago, there were lots of PC mags you could buy, which caused some folks to say look how much better the PC is supported than other platforms. Truth was, at the time, such support was needed given the mess of 640k limits, DOS, IRQs and the like, most of which issues have ceased to be relevant. Anyway, why should one need a course to learn PHP, assuming you already know other languages. It's simple enough. -- Cheers -- Tim --**--** -- 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 -- github.com/KingCrunch
Re: [PHP] Re: PHP vs JAVA
On 21 Aug 2013, at 15:01, georg chambert georg.chamb...@telia.com wrote: my I shake the subject a little; Ive been doing some PHP and found it ok to work with not so much fuss, but that was PHP4, what about PHP5 ? Dont really checked the difference but made a short-scan and found that it had be screwed around with ? Any think, should I change to 5 ? Yes, even if it's only because PHP4 hasn't been supported in any way, including security fixes, since August 7th, 2008! This fact alone makes it pretty dangerous to be using it on a public site, and that's without getting into all of the improvements that PHP5 has introduced over the past five years! -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] Re: PHP vs JAVA
Sorry in advance for the top post. Use the right tool for the Job. I've use Java, C# and PHP. 1. I hate the Perl-like object calls in PHP. I'd rather use . notation in C# and Java. It saves a lot of wear and tear on my left pinky finger. 2. Java and C# are both typed languages. Say what you want, but I have working with a string like 02 and have PHP convert that to an integer. sometimes I want that zero in front. If I want that to be an integer in Java it's int myInteger = Integer.parseInt(02); 3. Java development environments (Eclipses, NetBeans, IBM RAD) are pretty horrible. Visual Studio is hands down a better envrionment, even the older versions of it. I've hooked Visual Studio into SVN in the past and it works well. 4 PHP development environments are many and varied and all of them suck at web debugging. I've used PHPEdit, Zend, Bluefish, Eclipse and a couple others. Bluefish works better on Linux than it does on Windows. Use the tool for the job at hand. Just my $0.02 worth. cheers, Curtis Tim Streater wrote: On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 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. To me the salient point is, does java has as extensive a library or set of interfaces to other packages (such as SQLite, mysql, etc)? 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. Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down its nose at PHP. There being lots of courses proves nothing in and of itself. 20 years ago, there were lots of PC mags you could buy, which caused some folks to say look how much better the PC is supported than other platforms. Truth was, at the time, such support was needed given the mess of 640k limits, DOS, IRQs and the like, most of which issues have ceased to be relevant. Anyway, why should one need a course to learn PHP, assuming you already know other languages. It's simple enough. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP vs JAVA
2013/8/21 Curtis Maurand cur...@maurand.com Sorry in advance for the top post. Use the right tool for the Job. I've use Java, C# and PHP. 1. I hate the Perl-like object calls in PHP. I'd rather use . notation in C# and Java. It saves a lot of wear and tear on my left pinky finger. Actually the problem is, that the dot . is already in use. With $foo.bar() you cannot tell, if you want to call the method bar() on the object $foo, or if you want to concatenate the value of $foo to the result of the function bar(). There is no other way around this than a different operator for method calls. 2. Java and C# are both typed languages. Say what you want, but I have working with a string like 02 and have PHP convert that to an integer. sometimes I want that zero in front. If I want that to be an integer in Java it's int myInteger = Integer.parseInt(02); 3. Java development environments (Eclipses, NetBeans, IBM RAD) are pretty horrible. Visual Studio is hands down a better envrionment, even the older versions of it. I've hooked Visual Studio into SVN in the past and it works well. Ever tried the jetbrains products? :D (No, they don't pay me) 4 PHP development environments are many and varied and all of them suck at web debugging. I've used PHPEdit, Zend, Bluefish, Eclipse and a couple others. Bluefish works better on Linux than it does on Windows. I use PhpStorm and it works quite fine. Use the tool for the job at hand. Just my $0.02 worth. cheers, Curtis Tim Streater wrote: On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 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. To me the salient point is, does java has as extensive a library or set of interfaces to other packages (such as SQLite, mysql, etc)? 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. Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down its nose at PHP. There being lots of courses proves nothing in and of itself. 20 years ago, there were lots of PC mags you could buy, which caused some folks to say look how much better the PC is supported than other platforms. Truth was, at the time, such support was needed given the mess of 640k limits, DOS, IRQs and the like, most of which issues have ceased to be relevant. Anyway, why should one need a course to learn PHP, assuming you already know other languages. It's simple enough. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch
Re: [PHP] Re: PHP vs JAVA
Sebastian Krebs wrote: 2013/8/21 Curtis Maurand cur...@maurand.com Sorry in advance for the top post. Use the right tool for the Job. I've use Java, C# and PHP. 1. I hate the Perl-like object calls in PHP. I'd rather use . notation in C# and Java. It saves a lot of wear and tear on my left pinky finger. Actually the problem is, that the dot . is already in use. With $foo.bar() you cannot tell, if you want to call the method bar() on the object $foo, or if you want to concatenate the value of $foo to the result of the function bar(). There is no other way around this than a different operator for method calls. I didn't think of that. It seems to me there could be an easier operator than - which sometimes will make me stop and look at what keys I'm trying to hit. Just a thought. I forgot about the concatenation operator which is + in Java/C# 2. Java and C# are both typed languages. Say what you want, but I have working with a string like 02 and have PHP convert that to an integer. sometimes I want that zero in front. If I want that to be an integer in Java it's int myInteger = Integer.parseInt(02); 3. Java development environments (Eclipses, NetBeans, IBM RAD) are pretty horrible. Visual Studio is hands down a better envrionment, even the older versions of it. I've hooked Visual Studio into SVN in the past and it works well. Ever tried the jetbrains products? :D (No, they don't pay me) I have not, but it looks interesting. I'll have to try it. 4 PHP development environments are many and varied and all of them suck at web debugging. I've used PHPEdit, Zend, Bluefish, Eclipse and a couple others. Bluefish works better on Linux than it does on Windows. I use PhpStorm and it works quite fine. Use the tool for the job at hand. Just my $0.02 worth. cheers, Curtis Tim Streater wrote: On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 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. To me the salient point is, does java has as extensive a library or set of interfaces to other packages (such as SQLite, mysql, etc)? 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. Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down its nose at PHP. There being lots of courses proves nothing in and of itself. 20 years ago, there were lots of PC mags you could buy, which caused some folks to say look how much better the PC is supported than other platforms. Truth was, at the time, such support was needed given the mess of 640k limits, DOS, IRQs and the like, most of which issues have ceased to be relevant. Anyway, why should one need a course to learn PHP, assuming you already know other languages. It's simple enough. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- github.com/KingCrunch
Re: [PHP] Re: PHP vs JAVA
On Wed, Aug 21, 2013 at 7:56 PM, Curtis Maurand cur...@maurand.com wrote: Sebastian Krebs wrote: Actually the problem is, that the dot . is already in use. With $foo.bar() you cannot tell, if you want to call the method bar() on the object $foo, or if you want to concatenate the value of $foo to the result of the function bar(). There is no other way around this than a different operator for method calls. I didn't think of that. It seems to me there could be an easier operator than - which sometimes will make me stop and look at what keys I'm trying to hit. Just a thought. I forgot about the concatenation operator which is + in Java/C# The PHP language developers were pretty stuck. Because of automatic string-to-numeric-conversion, they couldn't use + for string concatenation. Sadly, they chose . rather than .. which I believe one or two other languages use. If they had, . would have been available once objects rolled around in PHP 4/5. I suspect they chose - since that's used in C and C++ to dereference a pointer. Ever tried the jetbrains products? :D (No, they don't pay me) I have not, but it looks interesting. I'll have to try it. Those are very good products which have had a strong following for a decade. The free IDE NetBeans also has quite good support for both Java and PHP, and the latest beta version provides a web project that provides front- and back-end debugging of PHP + JavaScript. You can be stepping through JS code and hit an AJAX call and then seamlessly step through the PHP code that handles it. I use NetBeans for PHP/HTML/JS (though I am evaluating JetBrains' PHPStorm now) and Eclipse for Java. You can't beat Eclipse's refactoring support in a free tool, though I think NetBeans is close to catching up. I would bet IntelliJ IDEA for Java by JetBrains is on par at least. Peace, David
[PHP] Re: PHP to Java
[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?... http://java.sun.com/docs/books/tutorial/index.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP to Java
[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?... + http://www.caucho.com/resin-javadoc/com/caucho/quercus/lib/mcrypt/Mcrypt.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and java applets
Am I? I thought that applets were allowed to connect to the same host they were loaded from. Which is what I'm trying to do. Nice site BTW, useful for a few other things I'm working on, thanks. Tom On Sat, May 22, 2004 at 07:46:21AM +0600, raditha dissanayake wrote: Tom Playford wrote: That was my original plan. The problem is that if someone works out the commands needed to communicate with the php control page, they will be able to bypass the Java access control systems. I suppose I could use https, but does that encrypt the url and post data? I think you have found yourself trapped in the java applet sandbox. You need to create a signed applet. see http://www.radinks.com/java/sandbox/ for a brief guide. all the best -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php and java applets
I'd implement access control in the java object if possible, sounds easier. Tom Playford [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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] Re: php and java applets
That was my original plan. The problem is that if someone works out the commands needed to communicate with the php control page, they will be able to bypass the Java access control systems. I suppose I could use https, but does that encrypt the url and post data? Tom Aidan Lister wrote: I'd implement access control in the java object if possible, sounds easier. Tom Playford [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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] Re: php and java applets
On Fri, 21 May 2004, Tom Playford wrote: I suppose I could use https, but does that encrypt the url and post data? Your data is encrypted when using ssl. -- Jeroen Describing the difference between computer hardware and software: Those parts of the system that you can hit with a hammer (not advised) are called hardware; those program instructions that you can only curse at are called software. -- From Levitating Trains and Kamikaze Genes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and java applets
Tom Playford wrote: That was my original plan. The problem is that if someone works out the commands needed to communicate with the php control page, they will be able to bypass the Java access control systems. I suppose I could use https, but does that encrypt the url and post data? I think you have found yourself trapped in the java applet sandbox. You need to create a signed applet. see http://www.radinks.com/java/sandbox/ for a brief guide. all the best -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and java applets
The link you provided seems broken -- here's another: http://www.raditha.com/java/sandbox/ raditha dissanayake wrote: Tom Playford wrote: That was my original plan. The problem is that if someone works out the commands needed to communicate with the php control page, they will be able to bypass the Java access control systems. I suppose I could use https, but does that encrypt the url and post data? I think you have found yourself trapped in the java applet sandbox. You need to create a signed applet. see http://www.radinks.com/java/sandbox/ for a brief guide. all the best -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and java applets
Travis Low wrote: The link you provided seems broken -- here's another: http://www.raditha.com/java/sandbox/ gee thanx that's the link i meant ;-) (my own site actually) -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP AND JAVA
Alexandra Aguiar wrote: may i use php with JAVA (note. not JAVASCRIPT , but JAVA APPLETS) !?! Depends on what you want to achieve. As long as the final embed is correct (i.e. the one that is sent to the client, after php-parsing), no problem at all. -- Kind regards, Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP and Java
I used LD_LIBRARYPATH=/usr/local/lib:/usr/java1.2/jre/lib/sparc:/usr/local/lib/php/modules but the problems 1) 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 continued. 2) Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 follow. -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] mailto:[EMAIL PROTECTED]%5D mailto:[EMAIL PROTECTED]%5D Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and Java From my experience getting Java to run w/ PHP and Apache on RedHat 7.0, you can try setting the LD_LIBRARY_PATH environment variable ( without which my Java would not run) set to the location of libjava.so, libjvm.so, and php_java.jar, in my case (without line feeds) LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386: /usr/java/j2sdk1.4.0/jre/lib/i386/server:/usr/local/lib/php Rich -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] mailto:[EMAIL PROTECTED]%5D mailto:[EMAIL PROTECTED]%5D Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [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]] mailto:[EMAIL PROTECTED]%5D mailto:[EMAIL PROTECTED]%5D 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
[PHP] Re: PHP and Java
the var is LD_LIBRARY_PATH ok! [Java] javahome=/usr/java12 javaclasspath=/usr/local/lib/php/php_javajar:/usr/java12/srcjar javalibrarypath=/usr/local/lib/php/extensions/no-debug-non-zts-20010901:/usr/java12/jre/lib/sparc javalibrary=/usr/java12/jre/lib/sparc/libjavaso extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20010901 (it is ok!) extension=libphp_javaso -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
RE: [PHP] Re: PHP and Java
What needs to be done here: You need to have the libphp_java.so in the libexec directory of apache so that it can load the module. Your error 2 is because the module is not loaded. Fix the 1 problem and the second will go away. Plus, I would run Tomcat and have that handle of all your java and access php through java...This is faster and reliable. Java in php is not as faster or reliable. Check the php documentation on this... Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 11:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP and Java I used LD_LIBRARYPATH=/usr/local/lib:/usr/java1.2/jre/lib/sparc:/usr/local/lib/php/ modules but the problems 1) 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 continued. 2) Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 follow. -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] mailto:[EMAIL PROTECTED]%5D mailto:[EMAIL PROTECTED]%5D Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and Java From my experience getting Java to run w/ PHP and Apache on RedHat 7.0, you can try setting the LD_LIBRARY_PATH environment variable ( without which my Java would not run) set to the location of libjava.so, libjvm.so, and php_java.jar, in my case (without line feeds) LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386: /usr/java/j2sdk1.4.0/jre/lib/i386/server:/usr/local/lib/php Rich -Original Message- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] mailto:[EMAIL PROTECTED]%5D mailto:[EMAIL PROTECTED]%5D Sent: Friday, March 01, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: [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]] mailto:[EMAIL PROTECTED]%5D mailto:[EMAIL PROTECTED]%5D 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
[PHP] Re: PHP and Java
the var is LD_LIBRARY_PATH ok! [Java] javahome=/usr/java12 javaclasspath=/usr/local/lib/php/php_javajar:/usr/java12/srcjar javalibrarypath=/usr/local/lib/php/extensions/no-debug-non-zts-20010901:/usr/java12/jre/lib/sparc javalibrary=/usr/java12/jre/lib/sparc/libjavaso extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20010901 (it is ok!) extension=libphp_javaso the problem continue 1) PHP Warning: Unable to load dynamic library '/libphp_javaso' - ldso1: /usr/ local/apache/bin/httpd: fatal: /libphp_javaso: open failed: No such file or directory in Unknown on line 0 [Fri Mar 1 12:06:01 2002] [notice] Apache/1322 (Unix) PHP/411 configured -- resuming normal operations [Fri Mar 1 12:06:01 2002] [notice] Accept mutex continued 2) Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/javaphp on line 4 follow -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
Re: [PHP] Re: PHP vs Java reliability
Geoff Caplan wrote: Michael the Why PHP on zend.com is a great place to go for this sort of stuff... Honestly, it doesn't seem all that professional a resource paper... I would tend to agree - not something you could show to a hard-headed corporate purchasing committee with any confidence. I believe Java *can* be pretty stable and robust, but at a cost which far exceeds PHP's. This is something that seemed to be missing from that article - a cost/benefit analysis compared to other platforms . Yeah, Java/ASP/etc can have enormous benefits over PHP in some situations, but the price tag is often beyond what people initially imagine. I suspect that this is the vital point - for the right type of project PHP will be quicker to develop and cheaper to deploy. I think the Zend case would be more credible if they defined the niche for PHP more clearly - which is surely the small to mid-sized project. My own project is aimed at making fully customised e-commerce affordable for the smaller organisation, and this seems an ideal field for PHP. For end-to-end enterprise computing, PHP would need better namespaces, a proper object model, more rigorous error handling, a thriving market in high-quality components (and/or a robust interface to Java) and a fully featured IDE. Zend 2 should lay the foundations for this, but by then Java will be so far ahead that PHP may never catch up. But does this matter? The great majority of organisations and projects are small, and for them PHP is ideal. If I were Zend, I would be focusing on products and pricing that appeals to this market, but they rather give the impression that they are aiming for the enterprise... Geoff Caplan I aggree. It comes down to what you are doing. But I dont think java is needed unless you are doing one damn big e-com site. Php can handle a fair bit. And to use java costs you a hell of a lot more. First thing to work out is if you need to use java. To many places jump in, thinking yeah we need a $50,000 server and $100,000 worth of dev software, when they would of done fine with a $10,000 server and $0 software. -- 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]
Re: [PHP] Re: PHP vs Java reliability
Michael the Why PHP on zend.com is a great place to go for this sort of stuff... Honestly, it doesn't seem all that professional a resource paper... I would tend to agree - not something you could show to a hard-headed corporate purchasing committee with any confidence. I believe Java *can* be pretty stable and robust, but at a cost which far exceeds PHP's. This is something that seemed to be missing from that article - a cost/benefit analysis compared to other platforms . Yeah, Java/ASP/etc can have enormous benefits over PHP in some situations, but the price tag is often beyond what people initially imagine. I suspect that this is the vital point - for the right type of project PHP will be quicker to develop and cheaper to deploy. I think the Zend case would be more credible if they defined the niche for PHP more clearly - which is surely the small to mid-sized project. My own project is aimed at making fully customised e-commerce affordable for the smaller organisation, and this seems an ideal field for PHP. For end-to-end enterprise computing, PHP would need better namespaces, a proper object model, more rigorous error handling, a thriving market in high-quality components (and/or a robust interface to Java) and a fully featured IDE. Zend 2 should lay the foundations for this, but by then Java will be so far ahead that PHP may never catch up. But does this matter? The great majority of organisations and projects are small, and for them PHP is ideal. If I were Zend, I would be focusing on products and pricing that appeals to this market, but they rather give the impression that they are aiming for the enterprise... Geoff Caplan -- 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]
[PHP] Re: PHP vs Java reliability
http://www.zend.com/zend/art/php-over-java.php the Why PHP on zend.com is a great place to go for this sort of stuff... On Mon, 21 Jan 2002, Geoff Caplan wrote: 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] -- 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]
[PHP] Re: PHP vs Java reliability
Philip Hallstrom wrote: http://www.zend.com/zend/art/php-over-java.php the Why PHP on zend.com is a great place to go for this sort of stuff... Honestly, it doesn't seem all that professional a resource paper for some reason. It's not technical enough, primarily, and I don't think it would help sway anyone's opinion (at least anyone in charge of making decisions on how to spend money). PHP works with Java - anyone who's tried to do this will attest it's shaky at best - ISAPI PHP works better, and that's not saying much at this point. I don't think there are any large (or even mid) sized projects using PHP/Java together in production The eweek article is pretty dated, and even though PHP is fastest, it still gets low marks. Argh... I wouldn't want that to be the ONLY piece a decision maker sees. The IT manager's piece isn't too bad, but is a bit overly simplistic, if it's geared at IT managers, imo (but the editors may have chopped it, who knows?). And Tobias has a pretty vested interest in PHP (course, anyone who promotes it probably does anyway, so that's not that big a detriment). I believe Java *can* be pretty stable and robust, but at a cost which far exceeds PHP's. This is something that seemed to be missing from that article - a cost/benefit analysis compared to other platforms. Geoff, if your clients are interested in total programming for the enterprise, you may have an uphill battle against Java (whether or not it's better is beside the point). Focus on the cost/benefit, not JUST the benefits. Yeah, Java/ASP/etc can have enormous benefits over PHP in some situations, but the price tag is often beyond what people initially imagine. Good luck. Michael Kimsal http://www.tapinternet.com/php PHP training 1-734-480-9961 -- 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]
[PHP] Re: PHP and JAVA
In 00f501c17b22$dd26da20$0600a8c0@shaemeli, Steve Haemelinck wrote: Hi all Does anyone got any experience with JAVA in PHP? I tried to rebuild php with java support. Everything worked well but when I try to initiate Java in PHP, I get cannot instantiate Virtual machine. I use kaffe and I believe I have configured PHP correctly. See http://www.haemelinck.be:8080/phpinfo.phtml look at http://php.chregu.tv/java-debian.html maybe this gives you a hint what you could have missed. chregu -- 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]
[PHP] Re: PHP and Java InputStream object
Is it possible use php to read a file and then using it to construct a java.InputStream object? Probably. Try it and see. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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]