LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   php https wrapper giving Segmentation fault but not http (http://www.linuxquestions.org/questions/linux-software-2/php-https-wrapper-giving-segmentation-fault-but-not-http-710863/)

imraven 03-11-2009 05:48 PM

php https wrapper giving Segmentation fault but not http
 
friends,

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:
Code:

$id = fopen('https://www.domain.com','r')
works:
Code:

$id = fopen('http://www.domain.com','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.

brandon

Manjunath1847 03-26-2009 08: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 03: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.

:D

brandon


All times are GMT -5. The time now is 01:43 AM.