wdlinux 和主机宝 在 php curl https的情况下出现 segmenet fault,可能原因是sqlite 3造成的

Centos 6.5 系统 的sqlite 3 的情况下可能出现此问题
解决方法比较蹊跷,首先定位为sqlite 3的方法是
gdb /path/to/php
>run curl_test.php
出现一堆错误,其中显示出sqlite

Starting program: /a/apps/php-5.2.17/bin/php curl_test.php
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffeb461e9c in sqlite3_file_control () from /usr/lib64/libsqlite3.so.0
Missing separate debuginfos, use: debuginfo-install zadmin-2.0.1-0.x86_64

阿里云的主机宝 php5.2 出现 502错误原因总结

  • sqlite 3  可能导致 php 5.2 版本出现 502错误 。解决方法:把/usr/lib/libsqlite-3 移走
  • openssl问题可能导致,解决方法,安装openssl-devel 然后重新编译 php ,附录为主机宝官方给的ssl方面的解决方法(未实验, 可能X86_64位需要修改)

============1======================
wget dl2.admin5.com/php/curl-7.37.1.tar.gz
tar zxvf curl-7.37.1.tar.gz
cd curl-7.37.1
./configure –prefix=/usr/local/curl
make && make install
cd ..
rm -rf curl-7.37.1*
============2======================
cd /a/apps/
wget dl2.admin5.com/php/php-5.2.17-have.tar.gz
rm -rf php-5.2.17
tar zxvf php-5.2.17-have.tar.gz
rm -rf php-5.2.17-have.tar.gz

===========3(镜像1.0)==============
cd /root
wget dl2.admin5.com/php/openssl-1.0.1h.tar.gz
tar zxvf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
./config –prefix=/usr/local/ssl shared zlib
make && make install
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
ldconfig -v
cd ..
rm -rf openssl-1.0.1h*
===========4=======================
killall -9 php-cgi
killall -9 php-cgi
service php-fpm start
service zadmin start

zhujibao