Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I want to execute phpcs commands from phpcode using shell_exec function. During execution it gives error /usr/bin/php: relocation error: /usr/bin/php: symbol X509_free, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference. How can I solve this issue??

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It seems that your libssl library is broken. Try running:

ldd /usr/lib/x86_64-linux-gnu/libssl.so
    linux-vdso.so.1 =>  (0x00007fffb3351000)
    libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f28feaf1000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f28fe731000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f28fe52c000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f28fe315000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f28ff149000)

If your output shows file not found or point to an old version of libcrypto.so.1.0.0, you should reinstall openssl.

And if you compile php from source, please make sure you have --with-openssl option with correct place of libssl dir.

share|improve this answer
    
Congrats on 3k! –  slm Mar 16 '14 at 15:20
    
Thank you, @slm! –  cuonglm Mar 16 '14 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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