PHP 4.0 Bug #3973: Java support Makefiles are incorrect in Solaris
| From: | jesusmc at scripps dot edu | Date: | Thu, 30 Mar 2000 03:14:22 +0000 |
| Subject: | PHP 4.0 Bug #3973: Java support Makefiles are incorrect in Solaris | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17379@lists.php.net to get a copy of this message | ||
From: jesusmc@scripps.edu
Operating system: Solaris 2.6
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Compile Failure
Bug description: Java support Makefiles are incorrect in Solaris
(This is related to bug ID # 3972)
The only way I could get Java support to compile for PHP 4.0RC1 in Solaris 2.6, was to manually
create the jar files.
I used the following config command:
./configure --prefix=/asd/dredox3/development/php4 \
--with-config-file-path=/asd/dredox3/development/php4 \
--enable-track-vars --enable-magic-quotes \
--enable-xml --enable-wddx --disable-debug\
--with-servlet=/asd/metallo1/server/jserv/JSDK2.0\
--enable-bcmath --enable-trans-id\
--with-java=/asd/prog/opt/jdk1.2 \
--with-gd=/asd/metallo1/server/libs/gd \
--with-mysql\
--with-apxs=/asd/dredox3/development/apache/sbin/apxs
And noticed several errors when compiling, mostly in the "sapi/servlet/" dir. One was
related to the file "sapi/servlet/servlet.java", which was using an incorrect method (at
least for Sun's JSDK 2.0). The diff is below:
*** php-4.0RC1/sapi/servlet/servlet.java Tue Mar 28 16:14:32 2000
--- orig-php-4.0RC1/sapi/servlet/servlet.java Thu Mar 9 05:07:24 2000
***************
*** 86,94 ****
} else {
int colon = data.indexOf(": ");
if (colon > 0) {
! /*response.addHeader(data.substring(0,colon),*/
! /* JSDK 2.0 uses setHeader instead. JMC */
! response.setHeader(data.substring(0,colon),
data.substring(colon+2));
} else {
response.getWriter().println(data);
--- 86,92 ----
} else {
int colon = data.indexOf(": ");
if (colon > 0) {
! response.addHeader(data.substring(0,colon),
data.substring(colon+2));
} else {
response.getWriter().println(data);
***************
*** 134,141 ****
try {
if (stream != null) stream.close();
} catch (IOException e) {
! /* JSDK 2.0 - Exception is a sting - JMC */
! throw new ServletException(e.toString());
}
}
--- 132,138 ----
try {
if (stream != null) stream.close();
} catch (IOException e) {
! throw new ServletException(e);
}
}
Even after this was done, the generated makefile was still giving trouble. So I manually compiled
the jar file:
% cd sapi/servlet
% mkdir net; mkdir net/php
% echo library=php4 | tee net/php/reflect.properties > net/php/servlet.properties
% cp formatter.java servlet.java net/php
% cp ../../ext/java/reflect.java net/php
% javac -classpath .:/asd/metallo1/server/jserv/JSDK2.0/lib/jsdk.jar:/asd/prog/opt/jdk1.2:./net/php
net/php/*.java
% jar cf phpsrvlt.jar net/php/*.class net/php/*.properties
And once this was done, the problem was in "ext/java", where for some reason, the Makefile
was not created, so I did also a manual jar file creation, following the Makefile.in steps.
Just to make sure it was not a problem w/ my inital config. I did "make clean", removed
the "*.cache" and configured again, this time w/ a JDK 1.1.x, same result. The
"ext/java/Makefile" was not existent, and there were problems w/ the jar file creation in
the "sapi/servlet" dir.
This is a problem that seems correlated w/ the failures I mentioned in bug report ID # 3972.