0

We have a situation where we're using circusd to manage processes and somehow, PHP is loading different libraries (specifically curl) when called from circus versus the command line.

From command line:

{"version_number":473344,"age":4,"features":2736797,"ssl_version_number":0,"version":"7.57.0","host":"x86_64-pc-linux-gnu","ssl_version":"OpenSSL/1.1.0g","libz_version":"1.2.8","protocols":["dict","file","ftp","ftps","gopher","http","https","imap","imaps","ldap","ldaps","pop3","pop3s","rtsp","smb","smbs","smtp","smtps","telnet","tftp"]}

From circusd:

{"version_number":472321,"age":3,"features":4163485,"ssl_version_number":0,"version":"7.53.1","host":"x86_64-redhat-linux-gnu","ssl_version":"NSS/3.28.4","libz_version":"1.2.8","protocols":["dict","file","ftp","ftps","gopher","http","https","imap","imaps","ldap","ldaps","pop3","pop3s","rtsp","scp","sftp","smb","smbs","smtp","smtps","telnet","tftp"]}

We have two versions of curl installed - I can't remove the older one as yum and other system processes rely on it, but I need the newer one that supports HTTP/2 in it.

My question is, how do I force PHP to use the newer library? This works fine on our test environment (ie. both libraries and PHP sees the newer one) so I'm assuming some sort of path issue.

  • circusd appears to be python - how exactly are you calling the php? – ivanivan Dec 7 '17 at 0:51
  • circusd calls it as a script which has php at the top: #/usr/bin/php – Jeremy Wilson Dec 7 '17 at 1:15
0

Most likely, php is using different php.ini files for the different environments. The easiest way is to use php -i, or phpinfo(); to determine exactly which php.ini file each environment is using. That should get you started on getting both to use the same curl version. It could be as simple as creating a symlink from the right php.ini to where the incorrect one was. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.