Forums / Bug Reports / *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

*[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Locked

Views: 4,831

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
29 Dec 2012, 8:59 AM
#1
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

*[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Hi,
I upgraded my server from Lion to Mountain lion, and to my surprise the sql database was deleted in the process. I had a backup of the file structure from time-machine, so I took a new installation of MySQL and restored the contents from the data folder.

On my server I run one ZenCart installation, one WordPress installation and the Piwik analyses program. Piwik and WordPress are fine, but my ZenCart shows some strange behavior and is unusable. At this moment I have noticed 4 different bugs:

  1. When adding products to a shopping cart, I get a 404 page not found error.
  2. When trying to log in, I get some times a 404 page error, but whatever happened - I am never logged in.
  3. Not able to access the admin part of ZC. When going to the ZC login page, it shows the following text at the bottom: "WARNING: An Error occurred, please refresh the page and try again." Any attempts to sign in just reloads the same page - no matter if I use real or wrong usernames and passwords.
  4. The site is not able to remember the language choice. When I switch from Norwegian to English and choose a product, the site goes back to Norwegian.

I see that the ZC database includes all users and administrators.

The site address is https://www.altikost.no

Examples from a couple of debug files from cache:

[29-Dec-2012 08:49:57 UTC] PHP Fatal error: 1062:Duplicate entry '21f6e63jqd0087scuhljgg5c0d6hmj4cbkr6gslf15936mkln9kvsbqv643acpca' for key 'PRIMARY' :: insert into sessions
values ('21f6e63jqd0087scuhljgg5c0d6hmj4cbkr6gslf15936mkln9kvsbqv643acpcafjke6rm0p9neheuhoff2k9oi7c4hhj3jibsngo0', '1356771897', 'c2VjdXJpdHlUb2tlbnxzOjMyOiJiYjU3NmMyZGNjNGYyYTI3OWQ1NjU3Y2E4YjMzYTIxOCI7') in /www/livetstre_net/altikost/includes/classes/db/mysql/query_factory.php on line 101

[29-Dec-2012 08:46:50 UTC] PHP Fatal error: 1062:Duplicate entry 'u4ggv7pgjip7ue1pbdjp2ikrjg4rub8671sbfr563l6m4gns9klautktn9b8qe95' for key 'PRIMARY' :: insert into sessions
values ('u4ggv7pgjip7ue1pbdjp2ikrjg4rub8671sbfr563l6m4gns9klautktn9b8qe95le8ufsmittvihgbuo3rod0hq6kq0cf2ddun7dv3', '1356772250', 'c2VjdXJpdHlUb2tlbnxzOjMyOiI1NWI3OTA3NGUwNjJjMjk5NjljZmFjNTNhNmNmMjM0MiI7Y3VzdG9tZXJzX2hvc3RfYWRkcmVzc3xzOjEyOiIxOTIuMTY4LjEwLjEiO2NhcnRJRHxzOjA6IiI7Y2FydHxPOjEyOiJzaG9wcGluZ0NhcnQiOjc6e3M6ODoiY29udGVudHMiO2E6MDp7fXM6NToidG90YWwiO2k6MDtzOjY6IndlaWdodCI7aTowO3M6MTI6ImNvbnRlbnRfdHlwZSI7YjowO3M6MTg6ImZyZWVfc2hpcHBpbmdfaXRlbSI7aTowO3M6MjA6ImZyZWVfc2hpcHBpbmdfd2VpZ2h0IjtpOjA7czoxOToiZnJlZV9zaGlwcGluZ19wcmljZSI7aTowO31uYXZpZ2F0aW9ufE86MTc6Im5hdmlnYXRpb25IaXN0b3J5IjoyOntzOjQ6InBhdGgiO2E6MDp7fXM6ODoic25hcHNob3QiO2E6MDp7fX1jaGVja192YWxpZHxzOjQ6InRydWUiO2xhbmd1YWdlfHM6OToibm9yd2VnaWFuIjtsYW5ndWFnZXNfaWR8czoxOiIyIjtsYW5ndWFnZXNfY29kZXxzOjI6Im5vIjtjdXJyZW5jeXxzOjM6Ik5PSyI7dG9kYXlfaXN8czoxMDoiMjAxMi0xMi0yOSI7dXBkYXRlRXhwaXJhdGlvbnN8YjoxO3Nlc3Npb25fY291bnRlcnxiOjE7Y3VzdG9tZXJzX2lwX2FkZHJlc3N8czoxMjoiMTkyLjE2OC4xMC4xIjs=') in /www/livetstre_net/altikost/includes/classes/db/mysql/query_factory.php on line 101

Really hope someone can help me regarding this!

29 Dec 2012, 9:22 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

einarso:

  1. When adding products to a shopping cart, I get a 404 page not found error.What's the URL in the browser when that happens?
    Do you have any URL-rewrite plugins installed?
    Please list all the plugins you've added, and all the customizations you've made to the site compared to original Zen Cart code.
    einarso:

  2. When trying to log in, I get some times a 404 page error, but whatever happened - I am never logged in.

  3. The site is not able to remember the language choice. When I switch from Norwegian to English and choose a product, the site goes back to Norwegian.Those are a result of having problems with starting sessions.
    einarso:

  4. Not able to access the admin part of ZC. When going to the ZC login page, it shows the following text at the bottom: "WARNING: An Error occurred, please refresh the page and try again."That means you're having database errors. http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again
    einarso:

Any attempts to sign in just reloads the same page - no matter if I use real or wrong usernames and passwords.That means you have session problems.
einarso:

I see that the ZC database includes all users and administrators.Not sure what you mean by that.
einarso:

[29-Dec-2012 08:49:57 UTC] PHP Fatal error: 1062: Duplicate entry for key 'PRIMARY' :: insert into sessions
That indicates your site is doing unexpected things when trying to start a session. It shouldn't be encountering already-existing records, because it checks to see if the record is there before trying to add it, and if it's already there it simply updates it. Not sure why yours is working differently than the way Zen Cart is written to work.
Perhaps your database tables have been damaged in your recovery?
Do you make regular database backups by exporting the database content to a backup.sql file? Or do you just take your chances and hope for the best?
Have your tables lost their auto-increment flag? (some do have one, some do not, but if none have it then you're guaranteed to have problems).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2012, 10:09 AM
#3
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

DrByte:

What's the URL in the browser when that happens?
1) When adding products to a shopping cart, I get a 404 page not found error.

Do you have any URL-rewrite plugins installed?
Please list all the plugins you've added, and all the customizations you've made to the site compared to original Zen Cart code.
The URL I get when trying to add to cart is:
http://www.altikost.no/index.php?main_page=page_not_found

I have no URL-rewrite plugins installed.

I only have a few plugins installed - none I can see as a reason for my problems. I have a norwegian shipping prices module installed (to get shipping costs from the norwegian postal office). I also have 3 payment-modules installed, one for credit cards, one for invoicing (Klarna) and PayPal.
I at one point tried installing a google analytics module. I then of course have a new template and language updates for norwegian. So not a complicated installation I believe.

DrByte:

*2) When trying to log in, I get some times a 404 page error, but whatever happened - I am never logged in.
4) The site is not able to remember the language choice. When I switch from Norwegian to English and choose a product, the site goes back to Norwegian.
*
Those are a result of having problems with starting sessions.

Is it possible that all of my problems are related to with starting sessions?

DrByte:

3) Not able to access the admin part of ZC. When going to the ZC login page, it shows the following text at the bottom: "WARNING: An Error occurred, please refresh the page and try again."
That means you're having database errors. http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again

I had previously found that help-page. I know that the DB information in the config-files are correct. ZC reads correctly from the DB. Perhaps not able to write to the DB?

DrByte:

That indicates your site is doing unexpected things when trying to start a session. It shouldn't be encountering already-existing records, because it checks to see if the record is there before trying to add it, and if it's already there it simply updates it. Not sure why yours is working differently than the way Zen Cart is written to work.
Perhaps your database tables have been damaged in your recovery?
Do you make regular database backups by exporting the database content to a backup.sql file? Or do you just take your chances and hope for the best?
Have your tables lost their auto-increment flag? (some do have one, some do not, but if none have it then you're guaranteed to have problems).

I had a file backup from september (my site does not have much traffic so I have not been very active in taking backups. I have tried renaming my db, created a new and importing the data from the file, gave it the correct name. That did not change any of my sites behavior. So it seems like the problem is not connected to the table or data in the DB. But I suspect of course that my problems are connected to the new installation of the DB and the restore from the TimeMachine backup. I see most of the tables have a number connected to auto increment. Some have "not available". If this is correct - I do not know :(

29 Dec 2012, 12:11 PM
#4
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

I have now tried to uninstall mysql totally from my server. Did a clean install and importer a DB backup file from today. No changes in behaviour. If this has something auto-increment to do, I am importing data that already have a fault in them. Don´t really know what to do next... Try a clean new installation perhaps and see if that works?

29 Dec 2012, 12:34 PM
#5
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

When I try a new and clean installation, I get an error:

Apache .htaccess Support = OFF

Can this explain something?

29 Dec 2012, 5:29 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

That only means your server has no security on it to prevent snoopers from accessing files they should not be able to get to, basically meaning your server's security leaves your site open to being abused as a phishing site, a heaven for spammers.

Has nothing to do with your database problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2012, 5:34 PM
#7
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

ps: this is the error according to the :: Zen Cart® Setup - System Inspection.

When I installed the MySQL database I followed the instructions here:
http://www.macminivault.com/mysql-mountain-lion/

In the last step, it says:
user@computer:$ sudo mkdir /var/mysql; sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

When I run this command in Terminal, it says:
mkdir: /var/mysql: File exists
ln: /var/mysql/mysql.sock: File exists

This command is supposed to "will allow Apache and PHP to access MySQL:"

Any relevance?

29 Dec 2012, 5:36 PM
#8
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

DrByte:

That only means your server has no security on it to prevent snoopers from accessing files they should not be able to get to, basically meaning your server's security leaves your site open to being abused as a phishing site, a heaven for spammers.
Has nothing to do with your database problem.

This was not a problem last time I installed ZC. It has changed now after I installed Mountain lion.

29 Dec 2012, 5:54 PM
#9
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

ok - the .htaccess problem was just because I used an another domain/website for my clean ZC installation and didn´t go through all the settings. This was not a problem with my original online site. Can the problem have anything to do with my post at 29 Dec 2012, 06:34 PM?

29 Dec 2012, 5:58 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

einarso:

DrByte:

That only means your server has no security on it to prevent snoopers from accessing files they should not be able to get to, basically meaning your server's security leaves your site open to being abused as a phishing site, a heaven for spammers.

Has nothing to do with your database problem.
This was not a problem last time I installed ZC. It has changed now after I installed Mountain lion.
I will elaborate, but that's an Apache configuration problem, and not a Zen Cart problem.

The .htaccess check is simply a test to access any .php file under the /includes/ folder of your site. Since the /includes/.htaccess file contains instructions to tell Apache to prevent accessing any .php files under the /includes/ folder, if the test that accesses the file finds that there is no error returned from Apache (when there should be), then it displays the message you quoted.
Basically it means your Apache security is broken. Again, that's a server configuration problem, not a Zen Cart problem. Zen Cart is merely pointing it out so that you can go fix your server problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2012, 5:59 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

einarso:

ps: this is the error according to the :: Zen Cart® Setup - System Inspection.

When I installed the MySQL database I followed the instructions here:
http://www.macminivault.com/mysql-mountain-lion/

In the last step, it says:
user@computer:$ sudo mkdir /var/mysql; sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

When I run this command in Terminal, it says:
mkdir: /var/mysql: File exists
ln: /var/mysql/mysql.sock: File exists

This command is supposed to "will allow Apache and PHP to access MySQL:"

Any relevance?

einarso:

ok - the .htaccess problem was just because I used an another domain/website for my clean ZC installation and didn´t go through all the settings. This was not a problem with my original online site. Can the problem have anything to do with my post at 29 Dec 2012, 06:34 PM?
Not likely.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2012, 6:03 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Let's back up a bit.

So, this was all working just fine before you deleted the database and restored its raw files from a backup of an old version?

Does a new install, on the same server, work fine, ie: allow login to the admin, allow you to add a product, allow customer to add products to shopping cart?
And then AFTER you've tested all that with a DEFAULT INSTALL and found them to work, THEN add a compatible language pack and test whether it can change languages too.
Don't test it with any imported data until after you've satisfied yourself that a NEW installation works just fine.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2012, 6:19 PM
#13
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

DrByte:

I will elaborate, but that's an Apache configuration problem, and not a Zen Cart problem.

The .htaccess check is simply a test to access any .php file under the /includes/ folder of your site. Since the /includes/.htaccess file contains instructions to tell Apache to prevent accessing any .php files under the /includes/ folder, if the test that accesses the file finds that there is no error returned from Apache (when there should be), then it displays the message you quoted.
Basically it means your Apache security is broken. Again, that's a server configuration problem, not a Zen Cart problem. Zen Cart is merely pointing it out so that you can go fix your server problem.

Thank you - I have already done that :)

29 Dec 2012, 7:36 PM
#14
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

ok - so now I have installed a clean new version of ZC 1.5, using a new empty DB - filled with the demo products. It still has the except same problems! 404 error when adding products to cart and 404 error when trying to register - and errormessage on the login to admin screen. see:
www.barneland.no


To start from the beginning:
Everything was working fine. Sadly - I decided to update my Lion server to Mountain Lion. This for some reason deleted my MySQL databases and removed all my server settings (users, websites, e-mail etc.). I redid all my server settings and installed a new version of MySQL and tried to restore the database files from a backup (file backup - not database backup). After doing this, my site was online again, but had the problems earlier described.

I have now unistalled MySQL and reinstalled a clean version. I have also now tried to install a clean version of ZenCart to use with my new installation of MySql. Still, both my old previously OK site (altikost.no) and my new clean ZenCart site (barneland.no) have the same problems.

I have tried various settings for my website (see attachment).

The new and clean ZC-installation (barneland.no) is rapporting the same problems as my store (I did cut out some of the rambling text):

[29-Dec-2012 18:40:25 UTC] PHP Fatal error: 1062: Duplicate entry 'vuq8pklqvkgd7898a0p5eun1atp1lvfbl4bnue7651l2hf7jm5bkoo39f1vekeo8' for key 'PRIMARY' :: insert into sessions
values ('vuq8pklqvkgd7898a0p5eun1atp1lvfbl4bnue7651l2hf7jm5bkoo39f1vekeo8mff36b0j40dpmdthvknkros9sp433c3d6oomql2', '1356807865', ...
...EyLTEyLTI5Ijt1cGRhdGVFeHBpcmF0aW9uc3xiOjE7c2Vzc2lvbl9jb3VudGVyfGI6MTtjdXN0b21lcnNfaXBfYWRkcmVzc3xzOjEyOiIxOTIuMTY4LjEwLjEiOw==') in /www/livetstre_net/altikost2/includes/classes/db/mysql/query_factory.php on line 101

I have tried about everything I can think of now. Hope anyone can give me more ideas to try...

Thanx!

Attachment 11671

29 Dec 2012, 10:00 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Let's try this as a test:

Edit /includes/auto_loaders/config.core.php, around line 76 and comment out these lines by adding // in front of EACH of these lines:```
$autoLoadConfig[0][] = array('autoType'=>'classInstantiate',
'className'=>'QueryCache',
'objectName'=>'queryCache',
'checkInstantiated'=>true);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2012, 11:50 PM
#16
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Hmmm.. Are you refering to the file in ZC 1.5?

Not able to attach my file to show you. I do not have any lines too similar to those you are refering to. The closest I came are the lines around 98. I tried disabling with // , but by doing that my site wouldn't load (front page that is. Admin login page loaded, but included the same error).
(see a txt copy of the file here: http://altikost.no/newname.txt)

30 Dec 2012, 12:10 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

That's from v1.5.1.
It wouldn't be relevant to v1.5.0. Sorry, I got this discussion mixed up with another one that was talking about v1.5.1 and semi-similar symptoms.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Dec 2012, 7:49 AM
#18
einarso avatar

einarso

New Zenner

Join Date:
Nov 2011
Posts:
45
Plugin Contributions:
0

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

ok :) Any tips for me? I always thought my last resort would be a new clean installation, but now even that would not work. Could it be a server configuration that has changed from lion to mountain lion? Perhaps something in Apache? But I guess that would mean everybody trying to install ZenCart on Mountain Lion server would have problems... My problem seems to be session-related? Does the DB handle anything regarding sessions, or is everything done with temp files within the ZC-file structure?

30 Dec 2012, 8:37 AM
#19
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,927
Plugin Contributions:
3

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Hi,

It does look like a session problem. Specifically the session key length.

if you know the location of your php.ini, can you please post here the values for:
session.hash_bits_per_character
session.hash_function

From the error it looks like your session id is 96 bytes long, and currently the db definition for Zen Cart only allows for 64 bytes.
You could increase the field length

TWO CHANGES:

  1. SQL updates:
ALTER TABLE sessions MODIFY sesskey varchar(255) NOT NULL default '';
ALTER TABLE whos_online MODIFY session_id varchar(255) NOT NULL default '';
  1. Small edit to /includes/application_top.php```
    if (isset($_GET[$key]) && strlen($_GET[$key]) > [B]43[/B]) {
Replace that line with these two lines:

[B] $len = (in_array($key, array('zenid', 'error_message', 'payment_error'))) ? 255 : 43;[/B]
if (isset($_GET[$key]) && strlen($_GET[$key]) > [B]$len[/B]) {

30 Dec 2012, 9:01 AM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: *[Done v1.5.2] Extra long session hash causing troubles on Mountain Lion Server

Ah, yes, that would be a result of the newer version of PHP in your new server software, which defaults to a longer session key length than what ZC was originally designed for.

Fix posted: https://github.com/zencart/zencart/commit/45d300c95e61d46ec2f316dbedb4f1b63daefb62

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.