mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Add suggestions for dealing with difficult installations, based on feedback
from multiple people. The .bashrc suggestion was from Rael Dornfest.
This commit is contained in:
parent
e24f505bf9
commit
1a6116c1f2
2 changed files with 114 additions and 0 deletions
|
@ -59,6 +59,10 @@ Build and execution instructions:
|
||||||
to utilize the existing JVM and threads from the servlet engine, and
|
to utilize the existing JVM and threads from the servlet engine, and
|
||||||
provides direct access to the servlet request and response objects.
|
provides direct access to the servlet request and response objects.
|
||||||
|
|
||||||
|
Finally, the bottom of this readme contains some guidance for how to
|
||||||
|
approach situations in which these instructions don't work on your
|
||||||
|
machine.
|
||||||
|
|
||||||
========================================================================
|
========================================================================
|
||||||
=== JVM=Kaffe 1.0.4 (as delivered with OS), OS=Redhat Linux 6.1 ===
|
=== JVM=Kaffe 1.0.4 (as delivered with OS), OS=Redhat Linux 6.1 ===
|
||||||
========================================================================
|
========================================================================
|
||||||
|
@ -160,3 +164,56 @@ php.ini:
|
||||||
[java]
|
[java]
|
||||||
java.class.path=F:\PHP4\Debug_TS\php_java.jar
|
java.class.path=F:\PHP4\Debug_TS\php_java.jar
|
||||||
extension=php_java.dll
|
extension=php_java.dll
|
||||||
|
|
||||||
|
=========================================================================
|
||||||
|
|
||||||
|
Guidance for when these instructions don't work.
|
||||||
|
|
||||||
|
JDK vendors don't typically document their internal workings, and are
|
||||||
|
typically very reliant on code inside of the JAVA main program and the
|
||||||
|
installation directory structure. For this reason, running PHP as a
|
||||||
|
servlet is typically much easier to get working. But if for some reason
|
||||||
|
this is not appropriate for you, and the instructions above don't work,
|
||||||
|
then read on.
|
||||||
|
|
||||||
|
The first thing to realize is that the directory structure of the JDK is
|
||||||
|
very important. Some users (particularly on Windows) get a message about
|
||||||
|
a DLL or shared library not being available and proceed to find that file
|
||||||
|
and copy it into a system directory. This typically just gets you to the
|
||||||
|
next problem - for example, it appears that many JDKs attempt to locate
|
||||||
|
the runtime Java classes (rt.jar) in a directory relative to these system
|
||||||
|
libraries. So unless you are inclined to copy your entire Java
|
||||||
|
installation, you are much better ajusting your PATHs.
|
||||||
|
|
||||||
|
Not documented above, but useful for many JDK's is ability to specify the
|
||||||
|
library path via java.library.path in the php.ini. On many Unix machines,
|
||||||
|
determining the initial value for this can be done by changing directory
|
||||||
|
to where you find a shared library that can't be loaded (example:
|
||||||
|
libjava.so), and executing "ld libjava.so". If you see some modules
|
||||||
|
listed as "not found", add the necessary directories to LD_LIBRARY_PATH
|
||||||
|
and repeat until successful. On my system, I require the following
|
||||||
|
two directories.
|
||||||
|
|
||||||
|
/home/jdk1.2.2/jre/lib/i386/native_threads
|
||||||
|
/home/jdk1.2.2/jre/lib/i386/classic
|
||||||
|
|
||||||
|
Note: this only determines the statically loaded libraries. Additional
|
||||||
|
libraries (such as libzip.so) may be loaded dynamically. On my system,
|
||||||
|
libzip.so is located in
|
||||||
|
|
||||||
|
/home/jdk1.2.2/jre/lib/i386
|
||||||
|
|
||||||
|
Another php.ini variable which may be helpful is java.home.
|
||||||
|
|
||||||
|
If java.library.path doesn't work for you (it won't on any JDK 1.1
|
||||||
|
implementations, for example), then try setting the system PATH or the
|
||||||
|
LD_LIBRARY_PATH before starting your web server. For Apache on Linux
|
||||||
|
systems, this can be accomplished by editing the Root's .bashrc and
|
||||||
|
adding the necessary export LD_LIBRARY_PATH statement.
|
||||||
|
|
||||||
|
If that doesn't work, try dividing an (hopefully) conquering by temporarily
|
||||||
|
eliminating items such as Apache from the process by adjusting the
|
||||||
|
arguments passed to the ./configure command (i.e., removing --with-apxs).
|
||||||
|
|
||||||
|
If all else fails, "man dlopen" on Unix systems will give more insight on
|
||||||
|
what the system is trying to do internally.
|
||||||
|
|
|
@ -59,6 +59,10 @@ Build and execution instructions:
|
||||||
to utilize the existing JVM and threads from the servlet engine, and
|
to utilize the existing JVM and threads from the servlet engine, and
|
||||||
provides direct access to the servlet request and response objects.
|
provides direct access to the servlet request and response objects.
|
||||||
|
|
||||||
|
Finally, the bottom of this readme contains some guidance for how to
|
||||||
|
approach situations in which these instructions don't work on your
|
||||||
|
machine.
|
||||||
|
|
||||||
========================================================================
|
========================================================================
|
||||||
=== JVM=Kaffe 1.0.4 (as delivered with OS), OS=Redhat Linux 6.1 ===
|
=== JVM=Kaffe 1.0.4 (as delivered with OS), OS=Redhat Linux 6.1 ===
|
||||||
========================================================================
|
========================================================================
|
||||||
|
@ -160,3 +164,56 @@ php.ini:
|
||||||
[java]
|
[java]
|
||||||
java.class.path=F:\PHP4\Debug_TS\php_java.jar
|
java.class.path=F:\PHP4\Debug_TS\php_java.jar
|
||||||
extension=php_java.dll
|
extension=php_java.dll
|
||||||
|
|
||||||
|
=========================================================================
|
||||||
|
|
||||||
|
Guidance for when these instructions don't work.
|
||||||
|
|
||||||
|
JDK vendors don't typically document their internal workings, and are
|
||||||
|
typically very reliant on code inside of the JAVA main program and the
|
||||||
|
installation directory structure. For this reason, running PHP as a
|
||||||
|
servlet is typically much easier to get working. But if for some reason
|
||||||
|
this is not appropriate for you, and the instructions above don't work,
|
||||||
|
then read on.
|
||||||
|
|
||||||
|
The first thing to realize is that the directory structure of the JDK is
|
||||||
|
very important. Some users (particularly on Windows) get a message about
|
||||||
|
a DLL or shared library not being available and proceed to find that file
|
||||||
|
and copy it into a system directory. This typically just gets you to the
|
||||||
|
next problem - for example, it appears that many JDKs attempt to locate
|
||||||
|
the runtime Java classes (rt.jar) in a directory relative to these system
|
||||||
|
libraries. So unless you are inclined to copy your entire Java
|
||||||
|
installation, you are much better ajusting your PATHs.
|
||||||
|
|
||||||
|
Not documented above, but useful for many JDK's is ability to specify the
|
||||||
|
library path via java.library.path in the php.ini. On many Unix machines,
|
||||||
|
determining the initial value for this can be done by changing directory
|
||||||
|
to where you find a shared library that can't be loaded (example:
|
||||||
|
libjava.so), and executing "ld libjava.so". If you see some modules
|
||||||
|
listed as "not found", add the necessary directories to LD_LIBRARY_PATH
|
||||||
|
and repeat until successful. On my system, I require the following
|
||||||
|
two directories.
|
||||||
|
|
||||||
|
/home/jdk1.2.2/jre/lib/i386/native_threads
|
||||||
|
/home/jdk1.2.2/jre/lib/i386/classic
|
||||||
|
|
||||||
|
Note: this only determines the statically loaded libraries. Additional
|
||||||
|
libraries (such as libzip.so) may be loaded dynamically. On my system,
|
||||||
|
libzip.so is located in
|
||||||
|
|
||||||
|
/home/jdk1.2.2/jre/lib/i386
|
||||||
|
|
||||||
|
Another php.ini variable which may be helpful is java.home.
|
||||||
|
|
||||||
|
If java.library.path doesn't work for you (it won't on any JDK 1.1
|
||||||
|
implementations, for example), then try setting the system PATH or the
|
||||||
|
LD_LIBRARY_PATH before starting your web server. For Apache on Linux
|
||||||
|
systems, this can be accomplished by editing the Root's .bashrc and
|
||||||
|
adding the necessary export LD_LIBRARY_PATH statement.
|
||||||
|
|
||||||
|
If that doesn't work, try dividing an (hopefully) conquering by temporarily
|
||||||
|
eliminating items such as Apache from the process by adjusting the
|
||||||
|
arguments passed to the ./configure command (i.e., removing --with-apxs).
|
||||||
|
|
||||||
|
If all else fails, "man dlopen" on Unix systems will give more insight on
|
||||||
|
what the system is trying to do internally.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue