Jump to content

upgrade button doesnt work to upgrade to 5.2.13


slic535

Recommended Posts

I'm getting the same error. 

The following errors were detected:
Sorry. CubeCart-5.2.13 .zip was not found. Please try again later.

Also getting this error when trying to do a backup:

The following errors were detected:
Error: PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to open file 'logs/traffic.html/.md5sums' in binary read mode
Link to comment
Share on other sites

Thank you. Somewhere, probably in the response to a query as to what is the latest version from cubecart.com, an extra space character is getting added to the latest version value. I don't see in the code where the extra space is coming from. I think this is a new problem at the cubecart.com website.

 

So, we need to trim the value. In the file admin/sources/maintenance.index.inc.php, near line 149:

Find:
if(isset($_GET['upgrade']) && !empty($_GET['upgrade'])) {
 
Add after:
$_GET['upgrade'] = trim($_GET['upgrade']);

A bug report has been submitted.

Link to comment
Share on other sites

If you can enable a browser traffic monitor, it would be beneficial to see what is being requested and what is being returned. I use Firefox with the Firebug add-on.

 

I am going to assume that, because Devellion has put the entire cubecart.com website under SSL, requests made to the various cubecart.com locations are coming back as 301 Moved Permanently. Unfortunately, the Request class may or may not be coded to handle that result.

 

So, the next edit to make in maintenance.index.inc.php:

Line 153:
Was:
$request = new Request('www.cubecart.com', '/download/'.$_GET['upgrade'].'/zip', 80, false, true, 10);
 
Now:
$request = new Request('www.cubecart.com', '/download/'.$_GET['upgrade'].'/zip', 443, false, true, 10);
// Nope!  $request->setSSL();
 
Line 159:
Was:
$contents = file_get_contents('http://www.cubecart.com/download/'.$_GET['upgrade'].'/zip');
 
Now:
$contents = file_get_contents('https://www.cubecart.com/download/'.$_GET['upgrade'].'/zip');
 
Line 523:
Was:
if ($request = new Request('cp.cubecart.com', '/licence/version/'.CC_VERSION)) {
 
Now:
if ($request = new Request('cp.cubecart.com', '/licence/version/'.CC_VERSION, 443)) {
  // Nope!  $request->setSSL();

Edit: Ignore this post, but read what follows.

Link to comment
Share on other sites

Until Devellion makes the retrieval of the CubeCart package from cubecart.com to not require SSL, this is what we have to deal with:

 

The change on line 153 is necessary, but it won't solve the problem. Before the change, the request for the file got a 301 Moved result from the server -- Moved to HTTPS which also includes a valid document (starts with DOCTYPE). The Request class cannot handle that and returns the document as received. The code at line 169 says to show that the file was not found (on the cubecart.com server).

 

(The request class has code that will set up an SSL transfer, but the internal mechanism, cURL, requires that the certificate CA chain be available to PHP. That chain quite probably is not installed on the web server hosting your site.)

 

An attempt to use port 443 without also using the HTTPS protocol gets me a 400 Status Error - Malformed URL. This, however, is OK because cURL returned an error - not a document - which the code at line 158 can test for. Since the Request errored, the code will use PHP's file_get_contents() function.

 

So the edit to line 159 is also required, but may pose a problem as well. Your installation of PHP will require the OpenSSL extension to be installed and enabled. You can test for this at admin, PHP Info, and scroll to the openssl section - if it's there. If so, you will probably - finally - get CubeCart to download and begin installing the latest package.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...