Jump to content

New install, but site redirects to https://cp.cubecart.com/


djpilot

Recommended Posts

Hi all,

I have just installed CubeCart onto my webhost, then deleted the install folder.

I can access the admin section, but when I try to access the actual site (as if I were a customer) the site redirects to https://cp.cubecart.com/

Can someone tell me what is possibly wrong or where to start looking?

I have searched in the forum with no luck (maybe I searched for the wrong thing??).

Thank you in advance.

Link to comment
Share on other sites

I have not come across this before because I choose to run my stores in the "free" mode. But it seems to me that this situation might come about if CC3 thinks it has a license key, but that the key is wrong. Or might not.

What version of CC3 did you install?

Link to comment
Share on other sites

Hi bsmither, thanks for your reply. The version I installed is 3.0.9. The reason I downloaded version 3 was because it was 'free'...

I also wish to run my store in 'free' mode. Here is a copy/paste of the Store Overview when I first sign in as admin.

Store Overview:

CubeCart Version: 	3.0.9 	Visit the CubeCart Downloads Server 	 

PHP Version: 	5.2.11 	Number of Products: 	2

MySQL Version: 	5.0.91-community 	Number of Customers: 	0

Image upload folder size: 	606 Bytes 	Number of Orders: 	0

Server Software: 	Apache/2.2.14 (Unix)

Client Browser: 	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 BTRS29395 Firefox/3.6.13 (.NET CLR 3.5.30729)

Hi Robsta,

I am unsure about any keys, I never asked for one, or received one. I have not registered anywhere except for this forum. From what I could work out (and I most certainly could be wrong) by downloading and installing V3, I didn't need to do anything except for upload (ftp) the files to my site, create a database, then the first time I open the site it took me through a config process (which all went fine as far as I can tell), then I deleted the install folder as requested and continued to login to the admin section.

I also completely deleted the entire site, and started again from scratch just in case I missed something during the install but I couldn't see anything (but again, I am certainly no expert so it is possible I did)...

I am not sure what to do next.

Link to comment
Share on other sites

  • 4 weeks later...
Guest shereen

I HAVE THE SAME PROBLEM!

i, too, have version 3.0.9, which i understand everyone is now poopooing b/c it's too old of a version, but i have been running this version for 4.5 years straight continously and have not had this problem before. no, the PHP version is not a problem at all, as my hosting site uses PHP 5.2.17 and, again, i have not had this issue at all previously. my site has been working without a hitch these past 4.5 years.

i experienced this problem yesterday (sunday evening, february 20, 2011) and i have been on the phone with my hosting site since then. i was told by my hosting company that they recently updated some of their servers to 64-bit and they are claiming that cubecart v.3.0.9 is apparently or seemingly not 64-bit compatible--is this true? if it is a 64-bit problem, then i don't understand why my public page is fine (www.splashgearusa.com) and my secured admin site is fine (https://splas004.secure.omnis.com/store/admin), but my front store site keeps getting redirected to cubecart.com (https://splas004.secure.omnis.com/store/index.php). i would think that if it's a 64-bit compatibility issue, then all of my pages would be affected and not just my front store...?...

hey, djpilot, who is your hosting site? i'd like to know if it's the same as mine and is specific to them, or if this is a more general problem.

also, are the updated and new versions of cubecart 64-bit compatible? b/c if not, then there's no reason for me to waste time and trouble upgrading. i have a LOT of add-ons and custom work done for my v.3.0.9 and i'm quite wary about upgrading and having even more issues trying to install my add-ons--any comment or input is appreciated.

also, looking forward to an answer to my query regarding the 64-bit angle on this problem.

--s--

www.splashgearusa.com

Link to comment
Share on other sites

Hi Shereen, sorry to hear about your troubles. Not that I can offer much help as I am really only just getting started.

My hosting is in Australia by a company called 'Crazy Hosts', although it seems you may be in the USA?

Good luck.

Link to comment
Share on other sites

I have never heard of a 32/64-bit incompatibility issue with a PHP application. It is the realm of the PHP language interpreter to work with the operating system that it is installed on. Consider the standard JPG image format: the image itself is bit-wise agnostic, but the version of the application you use to create and edit the image (probably) is dependent on the OS bit-size. (And if a PHP script were bit-wise sensitive, then I think there would be an immediate 500 Server Error message.)

So, what is it about 3.0.9 that does a "302 Moved Temporarily"? I don't have a copy of 3.0.9, so I can't investigate the code. But I would suggest downloading the EditConf utility from here:

https://support.cubecart.com/index.php?/Knowledgebase/List/Index/24/cubecart-version-3

and see if there is a config setting that got added. Look for $config['lk'] or $config['lkv']. (I', looking at the code for 3.0.20, so I can't assert that you will see what I am asking you to see.)

Link to comment
Share on other sites

Guest shereen

I have never heard of a 32/64-bit incompatibility issue with a PHP application. It is the realm of the PHP language interpreter to work with the operating system that it is installed on. Consider the standard JPG image format: the image itself is bit-wise agnostic, but the version of the application you use to create and edit the image (probably) is dependent on the OS bit-size. (And if a PHP script were bit-wise sensitive, then I think there would be an immediate 500 Server Error message.)

So, what is it about 3.0.9 that does a "302 Moved Temporarily"? I don't have a copy of 3.0.9, so I can't investigate the code. But I would suggest downloading the EditConf utility from here:

https://support.cubecart.com/index.php?/Knowledgebase/List/Index/24/cubecart-version-3

and see if there is a config setting that got added. Look for $config['lk'] or $config['lkv']. (I', looking at the code for 3.0.20, so I can't assert that you will see what I am asking you to see.)

yeah, so, i just got off the phone with my hosting company and now they say that the problem i am experiencing is NOT about 64-bit compatibility, but they still have no clue and they are telling me that it is still about the cubecart code.

the weird thing is that it is only affecting my store front (https://splas004.secure.omnis.com/store/admin) and it is intermittent--sometimes will redirect to cubecart.com, sometimes won't. it does not affect my admin site at all or my public page (which is entry into the secured store front).

where can i find this "302 temporarily moved" code and can i delete it??

the hosting company did mention that this past weekend they did have a MySQL error, which i did witness, but i thought they were upgrading and didn't worry about it too much until that same night when i noticed the redirect problem. they also happened to upgrade some of their servers to 64-bit, so, they think all of this and my problem are coincidental.

ok, so, b/c i'm not a professional coder, i want to be clear about your suggestion to me: you want me to download the editconfig utility and then compare MY editconfig utility that i already have with the one you want me to download to see if there are any differences--correct? what should i do if there are differences between MY editconfig tool and the one that is currently on the cubecart site?

looking forward to your reply.

--s--

http://www.splashgearusa.com

Link to comment
Share on other sites

Where can i find this "302 temporarily moved" code and can i delete it??

Um.. no... The "302 Temporarily Moved" is what I see when I use the diagnostic mode of my web browser. There is a PHP function called header() which tells the web server to send this message to the visitor's web browser. The browser then knows what to do with the information provided along with the message.

The hosting company did mention that this past weekend they did have a MySQL error...

OK, that would have me looking at the database in ways maybe you do not yet know how to do.

I want to be clear about your suggestion to me: you want me to download the editconfig utility and then compare MY editconfig utility that i already have with the one you want me to download?

I did not realize you had the editconf utility already. No need to download another copy. Use it to see if the list of $config variables include what I had mentioned.

Link to comment
Share on other sites

Guest shereen

I did not realize you had the editconf utility already. No need to download another copy. Use it to see if the list of $config variables include what I had mentioned.

ok, i will use the editconfig utility and report what i find. the thing is i work full-time, so, may not get to this immediately, but will post what i find.

also, i just got off the phone (again) with the hosting company and i was offered the option to restore the entire site to a previous date, which i chose to do. luckily i did not get any orders yesterday or today, soooooo, i'm really hoping this restore will work.

...doing a google search, i found this thread (ironic as 2006 is the year i installed cubecart):

apparently this was a common problem back then when folks were upgrading to a newer version of cubecart (however, i have done no such thing this past weekend), and one poster suspected, for some reason, that their issue might be due to a corrupted database...bsmithers, do you think that the MySQL database glitch on sunday may have caused this redirect? if so, is there a particular place in the MySQL database you want me to search for abnormalities?

looking forward to your reply.

--s--

http://www.splashgearusa.com

Link to comment
Share on other sites

If a tree falls in the forest and no one saw it, and there is a dead bear under it, did the falling tree kill the bear?

I would like to view the 3.0.9 code base and also look in the config database table. But if a restore (Restore what? The store code, or the database, or both?) makes it go away, then, well... that's good for you.

I would still like to see the 3.0.9 code base.

PM sent.

Link to comment
Share on other sites

Guest shereen

so, as it turns out, the problem i experienced WAS INDEED a 64-bit issue--not a licensing issue. thanx! bsmither for your time, energy, and insight into this matter.

for those of you who are running an older version of cubecart (v.3.0.9 or earlier), these earlier versions use a php function that behaves differently on Linux PHP-64, which means if your hosting company upgrades their servers to 64-bit, and you are using an older version of cubecart, you WILL be redirected to cubecart.com and it will affect all of your store/index.php pages. however, if you upgrade to any cubecart version after that, then you should be fine, as that code has been updated; or, if you are not readily able to upgrade, then you can change the code yourself. if you are still in the dark about this, please contact me directly for a more detailed explanation.

i would like to now close my posts as the issue has been resolved.

--s--

http://www.splashgearusa.com

Link to comment
Share on other sites

  • 3 weeks later...
Guest chantesse

I am a 3.09 user who is highly reluctant to upgrade (in fact it is not going to happen) due to the number of customizations and purchased mods.

Have been hit with the same redirection problem all of a sudden.

Am pretty sure there is an explanation / a simple fix that does not involve voodoo.

The whole point of all Cubecart's PHP script being editable, unlike some other encrypted apps, is to provide way out, is it not?

Elsewhere I see people reported success by uploading a 3.08 'sessions' file into their 3.09 for a workaround.... is this the real answer?

Hoping something will turn up...

Link to comment
Share on other sites

Here's the fix for CC3.0.9:

In the file /store/classes/xtpl.php, you have at about line 230:


function parseDecode(){

	global $config,$uniKey,$uniKey2,$lkParsed;

	

	if(isset($config['lkv']) && $config['lkv']>0 && ereg("^([0-9]{6})+[-]+([0-9])+[-]+([0-9]{4})$",$config['lk']) && crc32($uniKey)==-961890963){

		return base64_decode($lkParsed);

	} elseif(crc32($uniKey)!==-961890963) {

		header(base64_decode($uniKey2));

		exit;

	} else {

		return base64_decode($uniKey);

	}

}


Here are some comments about Linux-64:



"This crc32 issue on 64-bit servers may not be a bug, but for sure it wrecks many applications when the server migrates to a linux 64-bit machine. For example, many database fields are set to accept signed 32 bits integers. This odd behavior makes those fields to be filled with the 2147483647 value, which is the higest possible number to be saved in this type of field. It seems the PHP team regards this as a operative system issue, rather than a language issue, but the result is just the same: You just can not rely on this for data comparison between machines."



"The reason is because the two constants PHP_INT_SIZE and PHP_INT_MAX have different values on the 64-bit Linux platform."





To fix, use this which is from the latest CC3 version:



function parseDecode(){

	global $config,$uniKey,$uniKey2,$lkParsed;



	if(isset($config['lkv']) && $config['lkv']>0 && ereg("^([0-9]{6})+[-]+([0-9])+[-]+([0-9]{4})$",$config['lk'])){

		return base64_decode($lkParsed);

	} else {

		return base64_decode($uniKey);

	}

}

So, in a way, CubeCartv3.0.9 *IS*, in fact, 32/64-bit specific. But only because it uses a PHP function (and 3.0.9 was the last version to use it) that became *broke* when running PHP 64-bit.

Making this change will stop the redirection.

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...