ask_123
03-21-2005, 12:49 AM
Does anybody know if TOMCAT support PHP at all?
Thanks in advance
Thanks in advance
|
Click to See Complete Forum and Search --> : PHP and TOMCAT ask_123 03-21-2005, 12:49 AM Does anybody know if TOMCAT support PHP at all? Thanks in advance Syngin 03-21-2005, 08:19 AM Huh? Um, not that I know of. Its for Java. If PHP is installed on the server, you might be able to use both on a page maybe. I've embedded PHP in Javascript files before with out a problem. Can't say I've ever tried combining those 2 though. goon12 03-21-2005, 10:11 AM http://www.google.com/search?hl=en&lr=&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=PHP+and+Tomcat&btnG=Search First link looks decent. ask_123 03-21-2005, 08:30 PM Thanks for the replies. This looks promising http://wiki.apache.org/jakarta-tomcat/UsingPhp fatTrav 03-22-2005, 12:07 AM Originally posted by ask_123 Thanks for the replies. This looks promising http://wiki.apache.org/jakarta-tomcat/UsingPhp you'd be better off configuring apache to serve php and java/jsp though the jk connector. there is a BIG performance boost to having apache use jk connector instead of having tomcat do things stand-alone. however it isn't easy to configure the connector and all the other java related settings. a local network box that gets just a few hundred hits a day might not be worth the trouble to set this up. however it is a good learning experience :) ask_123 03-22-2005, 12:12 AM I know I can use Apache + php + Tomcat, but would the performance gain you suggested be offsetted by the fact that I have to run an extra server ( I do not have a super fast server)? fatTrav 03-22-2005, 11:03 PM Originally posted by ask_123 I know I can use Apache + php + Tomcat, but would the performance gain you suggested be offsetted by the fact that I have to run an extra server ( I do not have a super fast server)? Well that depends. Apache + PHP is a trivial server setup. Apache + Java (though the jk connector) is more difficult to get working. I would still recommend using the Apache + PHP + jk_connector (which uses Tomcat) because the overall performance is a lot greater. JSP sites and java web based applications will serve quite a bit faster. What is the scope of what you are wanting to do? If the scope of what you want to do can justify the better part of a full work week to get this set up working (apache + php + tomcat connector) then do it. Other wise dont do it. Off hand, it might still be the most efficient way to do things. Apache blows Tomcat away in webpage serving and it should by every means serve php pages faster. With this setup the only thing Tomcat sees are the java requests which come to it from the connector. Tomcat is the weak link in this chain. ask_123 03-22-2005, 11:55 PM I think I shall try both and see what is the different. In my application, the servlet shall handle 90% of the request, while the PHP page shall handle rest 10%. Therefore, I inclined to stick to TOMCAT only. However, like what you said, it could be a good learning experience that may benefit me in the future, so I shall try both. Thanks for all the advices. fatTrav 03-23-2005, 06:47 PM Originally posted by ask_123 I think I shall try both and see what is the different. In my application, the servlet shall handle 90% of the request, while the PHP page shall handle rest 10%. Therefore, I inclined to stick to TOMCAT only. However, like what you said, it could be a good learning experience that may benefit me in the future, so I shall try both. Thanks for all the advices. Not a bad idea. At my old work we had large web applications that used JSP/Java for some of the logic and then PHP for other parts. We ran everthing though Apache and Java stuff through the mod_jk connector. But then when you're serving about 500 such sites the performance boost more than makes up for the config/install time. :) justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |