Project

Profile

Help

Bug #2907

php saxon.so is looking for libsaxonhec.so without so extension in both /usr/lib64 and /usr/lib and failing

Added by Michael Kynast about 2 years ago. Updated 12 months ago.

Status:
Closed
Priority:
High
Category:
PHP Build
Start date:
2016-08-26
Due date:
% Done:

100%

Found in version:
1.0.2
Fixed in version:
1.1.0

Description

Installation of libsaxon-HEC-setup64-v1.0.2 on Centos 6.8. When xpathExamples.php is executed from the browser it fails. httpd error log shows the following:

"Error: : No such file or directory

Unable to load /usr/lib64/libsaxonhec."

Notice the "so" is missing from the filename extension.

libsaxonhec.so file does in fact exist under both /usr/lib and /usr/lib64 +copied as per instructions+. It however now requires both /usr/lib64/libsaxonhec. and /usr/lib/libsaxonhec. to exist in order for php to find them and execute the script.

During installation ldconfig output errors with libsaxonhec.so is truncated, which devs say previously to ignore.

Output from phpinfo correctly shows

Saxon/C enabled

Saxon/C EXT version 1.0.2

Saxon 9.6.0.9

chcon was properly updated as per instructions for this library.

jet_err_12144.txt (72.7 KB) Michael Kynast, 2016-08-26 22:46 jet_err_12144.txt

Related issues

Related to Saxon/C - Bug #3699: Unable to load /usr/lib/libsaxonhec64.so on centos7 httpd In Progress 2018-02-23 Actions

History

#1 Updated by Michael Kay about 2 years ago

Thanks for reporting it. O'Neil is on vacation this week but I will leave it for him to look at when he's back, since he's the expert in this area.

#2 Updated by O'Neil Delpratt about 2 years ago

Hi,

Thanks for reporting the problem you have found. I will investigate this and try to reproduce the problem you have found on a centos machine and report back shortly. There has been some changes in this area of locating the library so it could be possibly a bug.

As a workaround you could try and set the environment variable SAXONC_HOME to where the libsaxonhec.so is located on your machine.

#3 Updated by Michael Kynast about 2 years ago

Well it was working with my work around but now most of the time it just crashes with JET errors similar to this once resolved bug.

https://saxonica.plan.io/issues/2670

Security context however is correct

chcon system_u:object_r:lib_t:s0 /usr/lib/libsaxonhec.so

chcon system_u:object_r:lib_t:s0 /usr/lib64/php/modules/saxon.so

JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR: system exception at 0x00007ff2ba05aee9

Please, contact the vendor of the application.

Extra information about error is saved in the "/tmp/jet_err_12144.txt" file

Attached: jet_err_12144.txt"

Just to add, I am using php 5.6 and openjdk-1.8.0.

#4 Updated by O'Neil Delpratt about 2 years ago

  • Status changed from New to In Progress

#5 Updated by O'Neil Delpratt about 2 years ago

Michael Kynast wrote:

Installation of libsaxon-HEC-setup64-v1.0.2 on Centos 6.8. When xpathExamples.php is executed from the browser it fails. httpd error log shows the following:

"Error: : No such file or directory

Unable to load /usr/lib64/libsaxonhec."

Notice the "so" is missing from the filename extension.

There is a bug in the SaxonCGlue.c file. where it locates the library it has incorrect length of the directory string. I have committed a fix to this under subversion. As mentioned in comment #2 you can use the SAXONC_HOME environment variable to avoid this problem.

I am looking at your comment #3 to try and reproduce the error you are getting.

#6 Updated by O'Neil Delpratt 12 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Comment 3 requires the setting of the environment variable LD_LIBRARY_PATH in the following place:

Ubuntu server: /etc/apache2/envvars

Centos server: /etc/sysconfig/httpd

SUSE server: /etc/sysconfig/apache2

#7 Updated by O'Neil Delpratt 12 months ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 1.1.0

Bug fix applied in the Saxon/C 1.1.0 major release.

#8 Updated by O'Neil Delpratt 7 months ago

  • Related to Bug #3699: Unable to load /usr/lib/libsaxonhec64.so on centos7 httpd added

Please register to edit this issue

Also available in: Atom PDF