From owner-freebsd-ports Mon Feb 4 23: 9:29 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mail.x9media.com (gwd.kluth.de [62.138.175.130]) by hub.freebsd.org (Postfix) with SMTP id 23F1337B42B for ; Mon, 4 Feb 2002 23:08:56 -0800 (PST) Received: from tm (80.132.209.165) by mail.x9media.com with MERCUR Mailserver (v4.01.09 Unregistered) for ; Tue, 5 Feb 2002 08:12:50 +0100 From: "nn" To: Cc: Subject: FreeBSD Port: mod_php4-4.1.1 Date: Tue, 5 Feb 2002 08:07:36 +0100 Message-ID: <000501c1ae13$d028a1e0$8c00a8c0@tm> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01C1AE1C.31ED09E0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C1AE1C.31ED09E0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Dirk, i tried to get the java/ext functions enabled in the /www/mod_php4 port. On FreeBSD 4.5 first i installed the /java/linux-jdk1.3.1, /databases/myqsl323-server and /www/apache13_modssl port. Then i have yust done a little change in the configure.php script. ------------------------------------------------------------------------ --------------------------- # /usr/ports/www/mod_php4/scripts/configure.php JAVA "Java Support" ON \ \"JAVA\") echo "CONFIGURE_ARGS+=--with-java=/usr/local/linux-jdk1.3.1" ;; ------------------------------------------------------------------------ --------------------------- # /.chrc (set the enviroment variables): set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin /usr/local/linux- jdk1.3.1/bin) setenv CLASSPATH /usr/local/linux-jdk1.3.1/lib/tools.jar:/home/thomas/javaprg setenv JAVA_HOME /usr/local/linux-jdk1.3.1 ------------------------------------------------------------------------ --------------------------- # /usr/local/etc/php.ini (my php.ini section) [java] java.class.path = /usr/local/lib/php/php_java.jar java.home = /usr/local/linux-jdk1.3.1 java.library = /usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot/libjvm.so extension_dir = /usr/local/lib/php/20010901 extension = libphp_java.so ------------------------------------------------------------------------ --------------------------- /usr/local/www/data.default/phpjavatest3.php (this is my testprogram) currentTimeMillis(); ?> ------------------------------------------------------------------------ --------------------------- This is my error: Fatal error: Unable to load Java Library /usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot/libjvm.so, error: Shared object "libnsl.so.1" not found in /usr/local/www/data.default/phpjavatest3.php on line 2 I read that posting on php.net from magnus, could it be a solution, what must i do ? An _very_ important thing here is to remember that the apache must be linked with pthreads (do "LDFLAGS=-lpthread ./configure ", or like me, add it the the .spec file). You can check if your apache is pthreaded with "ldd $(which httpd)" if you like. I experianced a lot of hangs/errors due to this problem, it's a shame that it's not in the docs / README (i didn't find it). It would be great to have java/ext support in futher versions of mod_php4. best regards thomas from berlin ------=_NextPart_000_0006_01C1AE1C.31ED09E0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi = Dirk,

 

i tried to get the = java/ext functions enabled in the /www/mod_php4 port. On FreeBSD 4.5 first i = installed the /java/linux-jdk1.3.1, /databases/myqsl323-server and = /www/apache13_modssl port.

 

Then i have yust done = a little change in the configure.php script.

-----------------------= -------------------------------------------------------------------------= ---

# /usr/ports/www/mod_php4/scripts/configure.php

JAVA       &nbs= p;    "Java Support" ON = \

\"JAVA\")

echo "CONFIGURE_ARGS+=3D--with-java=3D/usr/local/linux-jdk1.3.1"

;;

-----------------------= -------------------------------------------------------------------------= ---

# /.chrc (set the = enviroment variables):

set path =3D (/sbin /bin /usr/sbin /usr/bin = /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin = /usr/local/linux-

jdk1.3.1/bin)

setenv  = CLASSPATH /usr/local/linux-jdk1.3.1/lib/tools.jar:/home/thomas/javaprg

setenv  JAVA_HOME = /usr/local/linux-jdk1.3.1

---------------------------------= ------------------------------------------------------------------

# /usr/local/etc/php.ini (my = php.ini section)

[java]

 java.class.path =3D /usr/local/lib/php/php_java.jar

 java.home =3D = /usr/local/linux-jdk1.3.1

 java.library =3D /usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot/libjvm.so

 extension_dir =3D = /usr/local/lib/php/20010901

 extension =3D = libphp_java.so

-----------------------= -------------------------------------------------------------------------= ---

/usr/local/www/data.default/phpjavatest3.php (this is my testprogram)

<?php

$systemInfo =3D new Java("java.lang.System");

print "Total = seconds since January 1, 1970:

".$systemInfo->= currentTimeMillis();

?>=

-----------------------= -------------------------------------------------------------------------= ---

This is my = error:

Fatal error: Unable to load Java = Library /usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot/libjvm.so, error: Shared = object "libnsl.so.1" not found in /usr/local/www/data.default/phpjavate= st3.php on line 2

=

 

I read that posting on =
php.net from magnus, could it be a solution, what must i do =
?
 
An _very_ important thing =
here is to remember that the apache must =
be
linked with pthreads (do =
"LDFLAGS=3D-lpthread =
./configure
<options>", or =
like me, add it the the .spec =
file).
You can check if your apache =
is pthreaded with "ldd =
$(which
httpd)" if you =
like.
I experianced a lot of =
hangs/errors due to this problem, it's a shame =
that
it's not in the docs / README =
(i didn't find it).
 
It would be great to have =
java/ext support in futher versions of =
mod_php4.
best =
regards
thomas from =
berlin

 

 

 

 

------=_NextPart_000_0006_01C1AE1C.31ED09E0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message