LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-23-2006, 12:45 AM   #1
chillyroll
LQ Newbie
 
Registered: Oct 2006
Posts: 25

Rep: Reputation: 15
How to configure PHP-4.4 with TomCat-5 on Fedora Core 1?


Hi guys,
I am having some configuration problem of PHP 4.4.4 with Tomcat 5.0.28. I tried many HotTo's but nothing worked. Can you guys help me out?

From many search results, I came to know that there are 2 solutions to it. One is to configure PHP with Apache and then include connectors between Apache and TomCat. And second one is to configure PHP with Tomcat itself. I am looking for the second solution.

Thanks in advance.
 
Old 10-23-2006, 01:05 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

PHP has nothing directly to do with Tomcat (the Java Servlet container).

If you want to use both PHP and Tomcat with Apache, you should:

1. Build Apache with PHP support
2. Download and install an appropriate JDK (Sun's latest Java 1.5.x is probably your best choice)
3. Download, install and configure Tomcat to use your Apache with your JDK

This is probably your best resource for item 3:
http://wiki.apache.org/tomcat/HowTo

'Hope that helps .. PSM

PS:
My statement above is absolutely true:
Quote:
PHP has nothing directly to do with Tomcat
However, I don't know if you've already come across and tried this link:
http://wiki.apache.org/tomcat/UsingPhp
 
Old 10-23-2006, 01:28 AM   #3
chillyroll
LQ Newbie
 
Registered: Oct 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks "paulsm4" for your quick reply! But......

Hi paulsm4,
First of all thanks for your QUICK reply.

I have already tried wiki.apache.org/tomcat/UsingPhp but it failed. When run following commands ==>

./configure --with-servlet=$TOMCAT_HOME --with-java=$JAVA_HOME

make

sapi/servlet/phpsrvlt.jar and libs/libphp4.so are supposed to be created but they have not. Also I did not get what is the PHP patch at the begining of that doc. How should I use it. And I guess that patch is also not complete.

I will again try to follow this procedure and lets hope all goes fine.

Meanwhile, can you please refer to that doc once again and suggest if I am wrong.

Also to inform you that I have already configured Tomcat. Also my PHP is working absolutely fine with Apache2, but I want to run it with Tomcat.

Thanks in advance.
 
Old 10-23-2006, 03:58 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
The main suggestions I can make is to redirect your "make" output, and check for errors (i.e. figure out why phpsrvlt.jar and libs/libphp4.so either didn't get built, or didn't get installed where you expected them:
Quote:
Instead of "make", try something like:
make 2>&1 make.err

Then, when it's done:
less make.err
Also: "make" (building the binaries) and "make install" (copying the binaries from your build directory) are usually two separate steps. Do you think maybe these files got *built* (in your sandbox), but never got *installed* (where you actually needed them)?

Just a thought .. PSM
 
Old 10-24-2006, 12:49 AM   #5
chillyroll
LQ Newbie
 
Registered: Oct 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Hi paulsm4,
I have configured PHP with Tomcat on Fedora Core 1 successfully. Thanks to you, but when I run any PHP script I get following error message(s).

----------------------------

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet php threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.jav a:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)

root cause

java.lang.UnsatisfiedLinkError: /root/php-4.4.4/libs/libphp4.so: /root/php-4.4.4/libs/libphp4.so: undefined symbol: ts_resource_ex
java.lang.ClassLoader$NativeLibrary.load(Native Method)
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
java.lang.Runtime.loadLibrary0(Runtime.java:788)
java.lang.System.loadLibrary(System.java:834)
net.php.reflect.loadLibrary(reflect.java:34)
net.php.reflect.<clinit>(reflect.java:29)
net.php.servlet.init(servlet.java:157)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.jav a:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
Apache Tomcat/5.0.28


------------------------

For your reference my Java, PHP and Tomcat paths are

/usr/local/jakarta-tomcat-5.0.28
/usr/java/j2sdk1.4.2_12
/root/php-4.4.4

Thanks in advance.
 
  


Reply

Tags
php, tomcat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat issues in Fedora Core 4 mharris45 Linux - Software 4 03-07-2007 02:34 PM
Unable to run Tomcat 5.5.9 on Fedora core 4 tech_j Linux - Software 2 09-04-2005 10:17 AM
Install Tomcat into Fedora Core 2 treotan Fedora 4 11-18-2004 08:33 PM
Tomcat 5.0.28 into Fedora Core 2 treotan Linux - Software 3 11-09-2004 10:50 AM
Not able to configure Tomcat on fedora jolly Linux - Software 0 02-11-2004 02:03 PM


All times are GMT -5. The time now is 05:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration