php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21321 Problem with stings
Submitted: 2003-01-01 15:28 UTC Modified: 2003-01-01 15:39 UTC
From: webmaster at crescentart dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.0 OS: Red Hat Linux 7.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: webmaster at crescentart dot com
New email:
PHP Version: OS:

 

 [2003-01-01 15:28 UTC] webmaster at crescentart dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-01 15:39 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC