Bug #73450 [NEW]: built on

From: Date: Thu, 03 Nov 2016 07:11:43 +0000
Subject: Bug #73450 [NEW]: built on
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205166@lists.php.net to get a copy of this message
From:             admin at angosso dot net
Operating system: string 'Linux' (length=5)
PHP version:      7.0.12
Package:          Dynamic loading
Bug Type:         Bug
Bug description:built on

Description:
------------
Compiler PHP avec l'option de configuration --with-openssl[=DIR].

Test script:
---------------
<?php
echo php_uname();
echo PHP_OS;

/* Some possible outputs:
Linux exemple.net 2.4.21-0.13mdk #1 Thu Oct 06 15:08:06 EST 2016 i686
Linux
{https://www.exemple.net}/includes/openssl/{headerfile}
HIS IS WRONG
--with-openssl=/var/www/vhosts/exemple.net/.../includes/openssl 
THIS IS RIGHT --with-openssl=/var/www/vhosts/exemple.net/.../
$host = 'www.exemple.net';
$data = 'user=redacted&pass=redacted&action=redacted';
$response = "";

if ( $fp = fsockopen("ssl:{$host}", 443, $errno, $errstr, 30) ) {

    $msg  = 'POST /wsAPI.php HTTP/1.1' . "\r\n";
    $msg .= 'Content-Type: application/x-www-form-urlencoded' . "\r\n";
    $msg .= 'Content-Length: ' . strlen($data) . "\r\n";
    $msg .= 'Host: ' . $host . "\r\n";
    $msg .= 'Connection: close' . "\r\n\r\n";
    $msg .= $data;
    if ( fwrite($fp, $msg) ) {
        while ( !feof($fp) ) {
            $response .= fgets($fp, 1024);
        }
    }
    fclose($fp);

} else {
    $response = false;
}
if ($fp = fsockopen('ssl://'. $host, 443, $errno, $errstr, 30)) {

Expected result:
----------------
<?php
$fp = stream_socket_client("tcp://www.example.net:8443", $errno,
$errstr, 30);
if (!$fp) {
    die("Unable to connect: $errstr ($errno)");
}

/* Turn on encryption for login phase */
stream_socket_enable_crypto($fp, true,
STREAM_CRYPTO_METHOD_SSLv23_CLIENT);
fwrite($fp, "USER god\r\n");
fwrite($fp, "PASS secret\r\n");

/* Turn off encryption for the rest */
stream_socket_enable_crypto($fp, false);

while ($motd = fgets($fp)) {
    echo $motd;
}
tcp://www.example.net
udp://www.example.net
ssl://www.example.net
sslv2://www.example.net
sslv3://www.example.net
tls://www.example.net
fclose($fp);
?>


-- 
Edit bug report at https://bugs.php.net/bug.php?id=73450&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=73450&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=73450&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=73450&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=73450&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=73450&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=73450&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=73450&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=73450&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=73450&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=73450&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=73450&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=73450&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=73450&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73450&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=73450&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=73450&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=73450&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73450&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=73450&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=73450&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#205166) next »