-   Linux - Software (
-   -   php https wrapper giving Segmentation fault but not http (

imraven 03-11-2009 04:48 PM

php https wrapper giving Segmentation fault but not http

OS: gentoo
PHP: PHP 5.2.8-pl2-gentoo (cli) (built: Mar 11 2009 15:15:20)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

i've been having an interesting problem today w/ php. i was doing some system updates when my system monitor (written in php) stopped working. php wasn't in the list of things to be updated. i tried running it from command line and sure enough it's giving a Segmentation fault. I've tracked it down to whenever my scripts are making fopen() or file_get_contents(), etc calls to an https url. however, if i make the same request but instead use http it works fine.

gives segfault:

$id = fopen('','r')

$id = fopen('','r')
i've been racking my brain over this one all day. i've since upgraded php and openssl and that didn't resolve it. so i'm doing a complete rebuild of the entire system. emerge -e world. it's almost complete but i have a feeling that's not going to resolve it.

i speculate it has something to do w/ a dependency and hence the complete system rebuild. however, before i did that i noticed that after i had upgraded the package: dev-libs/glib, was when php started to go wonky.

anyway, any help would be appreciated.


Manjunath1847 03-26-2009 07:31 AM

Not sure if this helps. Since http is working and not https, I am sure this is some issue with the openssl. Make sure your php.ini file is configured properly. Also make sure your PHP has all the required extension DLL to perform HTTPS operation.

imraven 03-27-2009 02:20 AM

i forgot to post but i already solved it. i had attempted to recompile openssl+php and i made sure the php.ini was proper to no avail. however, when i compared the exact same setup to a different server it was working fine. the only thing that was different was that the other server was running a newer version of the kernel. sure enough when i upgraded the kernel the seg fault went away.



All times are GMT -5. The time now is 09:10 PM.