Is it possible to control which libraries apache uses?

Ok, so I had a problem earlier with PIL , which has not yet been resolved. Someone else had this problem, and he had success removing the old JPEG library . However, I cannot do this on my machine, since it is RHEL and many things depend on libjpeg and libjpeg-devel (when I tried yum to remove libjpeg just to see, there were a total of 252 packages that would be removed!)

I have jpeg-8 installed in / usr / local / lib. It is used correctly by python, but not apache. Here is a list from lsof:

COMMAND     PID      USER   FD      TYPE             DEVICE     SIZE       NODE NAME
httpd     xxxxx      root  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
python    xxxxx    jordan  DEL       REG              253,3             xxxxx63 /usr/local/lib/libjpeg.so.8.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0
httpd     xxxxx    apache  mem       REG              253,3   xxxxx0    xxxxx34 /usr/lib64/libjpeg.so.62.0.0

So, here is what interests me. Given that I cannot remove libjpeg-6b, is there a way to get apache to use libjpeg-8 instead?

, lsof , apache libjpeg.so.8.0.0 , , , 62, 8 ?

# 1

ldd lib64/modules libjpeg. ldd PIL _imaging.so , libjpeg. , PIL - .

- , , httpd python, libjpeg? , - apache, lsof.

+1
1

, jpeg, , , , , .

, , PHP Apache PHP, jpeg. PHP , Python, .

, mod_php, Apache. , ​​ , . , PHP, . PHP, PHP fastcgi, PHP Apache. , / PHP jpeg.

jpeg, , , . - Apache , :

LD_PRELOAD=/some/path/libjpeg.so.8.0.0
export LD_PRELOAD

, , - .

, PHP, , ldd, , PHP , Apache.

+1

Source: https://habr.com/ru/post/1729410/


All Articles