2

I am trying to install the Saxon-C XSLT-parser with it's PHP module on my server as explained here: http://www.saxonica.com/saxon-c/index.xml. I successfully installed it and compiled the PHP module. Maybe someone of you might have an idea, whats going wrong.

When starting apache I get the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/saxon.so' - 
libsaxon.so: cannot open shared object file: No such file or directory in Unknown on line 0

I know that it is searching the LD library.

more /etc/ld.so.conf.d/jetvm.conf
/opt/saxon/rt/lib/amd64
/opt/saxon/rt/lib/amd64/jetvm

tail -n 1 /etc/apache2/envvars
export LD_LIBRARY_PATH=/opt/saxon/rt/lib/amd64:/opt/saxon/rt/lib/amd64/jetvm:$LD_LIBRARY_PATH

echo $LD_LIBRARY_PATH
/opt/saxon/rt/lib/amd64:/opt/saxon/rt/lib/amd64/jetvm/

Everything seems to be right. I also double checked that all Paths are existing.

I have already checked the following threads (and much more), which couldn't help me:

After trying a couple of hours without any progress I really hope, someone can help me here. Maybe the solution is quite dump. I have not much experience with languages which has to be compiled, therefore I can only understand vaguely what is going on here.

Have many thanks in advance and best wishes.

3 Answers 3

1

The troubleshooting guide provides some hints to this problem:

Run the following command should resolve the error: "$ sudo ldconfig". Alternatively create a symlink to java virtual machine. This is not required to install/compile, but it is required for PHP code. The following should resolve the issue on a 64-bit machine:

ln -s $JAVA_HOME/jre/lib/amd64/server/libjvm.so /lib64/libjvm.so

Alternatively, it is possible to link the libjvm.so from the rt/lib/jetjvm directory.

Sign up to request clarification or add additional context in comments.

6 Comments

Note: Your paths to the JVM or are probably different to my description
Thank you for your will to help, but I knew the section from that troubleshooting you are citing, it's the same page I mentioned above and it's they are talk about a different error that I get. Besides, I tried both things nevertheless, but it did't help :(
Did you put the libsaxon.so under the directory '/usr/lib'? I think this could be the problem. In the 0.3.1 release the location of the libsaxon.so is hard coded to that location. We have changed to use a environment variable in the next release.
Good to know that, I put it under /usr/lib64 and /usr/local/lib. Thank you! After making a symbolic link to /usr/lib the php module now gets loaded. But unfortunately when I want to instantiate the SaxonProcessor I get a segmentation fault without any further information...
Please can you post the code. Also post the error from the log file which should show up what is going wrong.
|
0

The libsaxon.so file must be installed within the /usr/lib directory. We are making steps in the next release to use an environment variable.

Comments

0

With the friendly aid of ond1, who is one of the developers of the Saxon, I finally found a solution. Apparently there are some Paths hardcoded so, you have to ignore the installer's question where to put the files and install it to /usr/lib.

I Uninstalled previous installation, installed to /usr/lib and coompiled from there - and now it works.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.