From:             [EMAIL PROTECTED]
Operating system: Red Hat Linux 7.1
PHP version:      4.3.0
PHP Bug Type:     Output Control
Bug description:  Problem with stings

Version 4.3.0 has the following problems. 

1) After upgrading from 4.2.3 to 4.3.0 the Apache web server (version
1.3.22) would not display pages and the entire system nearly locked up.

2) After runing make install I tried to run make uninstall but an error
was recied stating no target specified. This problem was not experienced
with earlier versions.

3) I have develpoed a script that works with the www.ups.com cgi script to
calculate a shipping rate. The script is having trouble outputing the
entire "string" that is out puted by the
http://www.ups.com/using/services/rave/qcost_dss.cgi file. I have been
using this script for two years and have never had this problem.

##This is a pre-configured United Parcel Service script.##
<?
//Strings for the shipping calculator.  
$codes = "POST /using/services/rave/qcost_dss.cgi HTTP/1.0\n";
$codes .= "Content-type: application/x-www-form-urlencoded\n";
$codes .= "Content-length: 271\n\n";
$codes .= "AppVersion=1.2&";
$codes .= "AcceptUPSLicenseAgreement=YES&";
$codes .= "ResponseType=application/x-ups-rss&";
$codes .= "ActionCode=3&";
$codes .= "ServiceLevelCode=GND&";
$codes .= "RateChart=Regular+Daily+Pickup&";
$codes .= "ShipperPostalCode=48235&";
$codes .= "ConsigneePostalCode=48221&";
$codes .= "ConsigneeCountry=US&";
$codes .= "PackageActualWeight=$value&";
$codes .= "ResidentialInd=0&";
$codes .= "PackagingType=00\n\n";       
                
//Open a socket to ups.com to get shipping rates.
$open_sock = fsockopen("www.ups.com",80, $errno, $errstr,10);
if(!($open_sock)){
        die("Can not open Socket");
} 
else {
        while(!(feof($open_sock))){
                fputs($open_sock, $codes);
                while($line = fgets($open_sock, 1000)){ 
                        $contents .= $line;
                        $check_out_find_rate = explode("%", $contents);
                        break;
                }                                       
        }
}
//if the shipping rate can not be found the script dies and directs the
user to a error page.
if($check_out_find_rate[14] == false){
        fclose($open_sock);
        die("$codes <br><br> $contents");
}
else{
        echo "$contents";
        fclose($open_sock);
}
?>


######Normaly this script out puts the following stings.####
HTTP/1.1 200 OK
Server: Netscape-Enterprise/6.0
Date: Sun, 15 Dec 2002 04:21:03 GMT
Content-type: multipart/mixed;boundary=UPSBOUNDARY
Content-length: 267
Connection: close

POST /using/services/rave/qcost_dss.cgi HTTP/1.0
Content-type: application/x-www-form-urlencoded
Content-length: 270

AppVersion=1.2&AcceptUPSLicenseAgreement=YES&ResponseType=application/x-ups-rss&ActionCode=3&ServiceLevelCode=GND&RateChart=Regular+Daily+Pickup&ShipperPostalCode=55428&ConsigneePostalCode=48235&ConsigneeCountry=US&PackageActualWeight=2&ResidentialInd=0&PackagingType=00


<HTML>
<BODY>
</BODY>
</HTML>


--UPSBOUNDARY
Content-type: application/x-ups-rss
Content-length: 78

UPSOnLine%1.2%0000%0000Success%3%GND%55428%US%48235%US%004%2%3.92%0.00%3.92%-1

--UPSBOUNDARY--

#####Notice that 3.92 is the actual shipping rate.#####

PHP Version 4.3.0 only out puts the first line which is:

HTTP/1.1 200 OK


I love PHP but version 4.3.0 is very bugy. Please fix this bug.
-- 
Edit bug report at http://bugs.php.net/?id=21321&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21321&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21321&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21321&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21321&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21321&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21321&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21321&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21321&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21321&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21321&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21321&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21321&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21321&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21321&r=gnused

Reply via email to