Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jan 2002 19:56:25 +0100
From:      "tm" <thomas.may@x9media.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   php4 + java/ext on freebsd4.4
Message-ID:  <002301c1a1e4$29296a40$0100a8c0@tm1>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0020_01C1A1EC.8A8A7C90
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

i installed the following ports on freebsd4.4:
mysql323-server, apache13-modssl, mod_php4 port, jdk(1.1.8)

and want to have php java/ext support. I added the following lines in =
the configure.php
script of the mod_php4 port.
-------------------------------------------------------------------------=
-----------------
JAVA            "Java Support" ON \

\"JAVA\")
echo "CONFIGURE_ARGS+=3D--with-java=3D/usr/local/jdk1.1.8"
;;
-------------------------------------------------------------------------=
-----------------
my php.ini script:

extension=3Dlibphp_java.so
[Java]
java.class.path =3D /usr/local/lib/php/php_java.jar
java.home =3D /usr/local/jdk1.1.8
java.library =3D /usr/local/lib/php/20010901/libphp_java.so
java.library.path =3D /usr/local/lib/php
-------------------------------------------------------------------------=
-----------------
my javatest.php programm:

<?php

  $system =3D new Java("java.lang.System");
  print "Java version=3D".$system->getProperty("java.version")." =
<br>\n";
  print "Java vendor=3D".$system->getProperty("java.vendor")." <p>\n\n";
  print "OS=3D".$system->getProperty("os.name")." ".
              $system->getProperty("os.version")." on ".
              $system->getProperty("os.arch")." <br>\n";

  $formatter =3D new Java("java.text.SimpleDateFormat","EEEE,
        MMMM dd, yyyy 'at' h:mm:ss a zzzz");
  print $formatter->format(new Java("java.util.Date"))."\n";

?>
-------------------------------------------------------------------------=
-----------------

I got the following error in the browser window:

Fatal error: Cannot instantiate non-existent class: java in =
/usr/local/www/data.default/javatest.php on line 3

Any idea ?
regards thomas


------=_NextPart_000_0020_01C1A1EC.8A8A7C90
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>i installed the following ports on=20
freebsd4.4:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>mysql323-server, </FONT><FONT =
face=3DArial=20
size=3D2>apache13-modssl, </FONT><FONT face=3DArial size=3D2>mod_php4 =
port,=20
jdk(1.1.8)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and want to have php java/ext support. =
I added the=20
following lines in the configure.php</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>script of the mod_php4 =
port.</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
--------------------------</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>JAVA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
"Java Support" ON \<BR></FONT><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>\"JAVA\")<BR>echo=20
"CONFIGURE_ARGS+=3D--with-java=3D/usr/local/jdk1.1.8"<BR>;;<BR>----------=
-------------------------------------------------------------------------=
-------</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>my php.ini script:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>extension=3Dlibphp_java.so<BR>[Java]<BR>java.class.path =3D=20
/usr/local/lib/php/php_java.jar<BR>java.home =3D=20
/usr/local/jdk1.1.8<BR>java.library =3D=20
/usr/local/lib/php/20010901/libphp_java.so<BR>java.library.path =3D=20
/usr/local/lib/php<BR>---------------------------------------------------=
---------------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my javatest.php programm:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;?php</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; $system =3D new=20
Java("java.lang.System");<BR>&nbsp; print "Java=20
version=3D".$system-&gt;getProperty("java.version")." =
&lt;br&gt;\n";<BR>&nbsp;=20
print "Java vendor=3D".$system-&gt;getProperty("java.vendor")."=20
&lt;p&gt;\n\n";<BR>&nbsp; print =
"OS=3D".$system-&gt;getProperty("os.name")."=20
".<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
$system-&gt;getProperty("os.version")." on=20
".<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
$system-&gt;getProperty("os.arch")." &lt;br&gt;\n";</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; $formatter =3D new=20
Java("java.text.SimpleDateFormat","EEEE,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;=20
MMMM dd, yyyy 'at' h:mm:ss a zzzz");<BR>&nbsp; print =
$formatter-&gt;format(new=20
Java("java.util.Date"))."\n";</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>?&gt;<BR>-------------------------------------------------------=
-----------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I got the following error in the =
browser=20
window:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT size=3D3><FONT=20
face=3D"Times New Roman"><STRONG>Fatal error</STRONG>: Cannot =
instantiate=20
non-existent class: java in =
<B>/usr/local/www/data.default/javatest.php</B> on=20
line <B>3</B></FONT></FONT></FONT></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV>Any idea ?</DIV>
<DIV>regards thomas</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG><FONT face=3D"Times New Roman"=20
size=3D3></FONT></STRONG>&nbsp;</DIV></FONT></FONT></DIV></BODY></HTML>

------=_NextPart_000_0020_01C1A1EC.8A8A7C90--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002301c1a1e4$29296a40$0100a8c0>