Bug 73167

Summary: [PATCH] php4 4.2.9 openssl building static needed
Product: Ports & Packages Reporter: Dmitry A Grigorovich <odip>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me CC: ale
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-Mk
none
file.diff none

Description Dmitry A Grigorovich 2004-10-26 17:10:29 UTC

php4 extension openssl when building shared does not work as necessary
1) http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/71754
2) http://bugs.php.net/bug.php?id=29934

This can't be fixed because PHP4 BUG !
Same bug in php 4.3.8 and now in php 4.3.9

Fix: To fix problem:

1) Remove ports php4-extensions, php4-<EXTNAME>, mod_php4
2) Patch ports with follow patches
3) Install mod_php4, php4-extensions
   Don't try install php4-openssl direcly - it's not needed !
   Even if some port using php4-openssl, all is ok
How-To-Repeat: 
File test.php

<?php
$fp = fsockopen( "ssl://example.com", 443, $errno, $errstr, $timeout = 30);
if (!$fp) {
    echo "$errstr ($errno)<br />\n";
} else {
    $out = "GET / HTTP/1.1\r\n";
    $out .= "Host: example.com\r\n";
    $out .= "Connection: Close\r\n\r\n";

    fwrite($fp, $out);
    while (!feof($fp)) {
        echo fgets($fp, 4096);
    }
    fclose($fp);
}
?>

Place test.php on web
Show test.php via browser
You are get error 0 !

Remove 'ssl://' and change 443 into 80 - all is ok
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-10-27 19:59:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Another PR about openssl extension over to maintainer. 
Alex, can you please look on this issue in near future?
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2005-03-14 14:45:15 UTC
State Changed
From-To: open->closed

Problem fixed, thanks for submission.