If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 1.5.x / Cannot sign-in with shared SSL and 1and1

Cannot sign-in with shared SSL and 1and1

Started by rayw1679 on 9 Feb 2013, 10:00 PM · Views: 11,698

Results 1 to 20 of 71
9 Feb 2013, 10:00 PM
#1
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #1 by rayw1679

Converted my store to 1.5.1 because my server (1and1) is dropping support on 4/1/13 for anything older than PHP 5.4. It is currently running PHP 5.2.17.

When I forced my server to PHP 5.4, I could not sign-in to admin. It kept going back to the sign-in screen. I promptly switched back to 5.2.17 and it worked. Assistance greatly appreciated, as I don't want to have to switch servers.

Thanks,
Ray

9 Feb 2013, 10:05 PM
#2
drbyte avatar

drbyte

Sensei

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

Post #2 by drbyte

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

9 Feb 2013, 10:37 PM
#3
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #3 by rayw1679

Thank you for your prompt response, DrByte. I apologize that I forgot to check the logs for an error -- I'm still learning.

Your solution scares me, but I'll give it a try (or ask 1and1 if there's a way to change the length), but would you please look at my error and see if you still think that's the case? It is a different error from the one in the referral post, and I don't get any errors on my screen -- it just loops back into sign-in:

PHP Parse error: syntax error, unexpected '{' in /.../store/includes/functions/password_funcs.php on line 102

Also, does anyone know of an editor that will display the line number? If I counted properly, line 102 is a comment, so I obviously don't know if it counts blank lines, etc.

Thanks,
Ray

9 Feb 2013, 10:40 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #4 by kobra

does anyone know of an editor that will display the line number?
http://notepad-plus-plus.org/

Zen-Venom Get Bitten

9 Feb 2013, 10:55 PM
#5
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #5 by rayw1679

Thank you, kobra. You are always helpful, and never condescending. I didn't see anything in the code I could figure out, but at least I know where line 102 is now. I don't read PHP, but this is how I figured out about the #1 admin having to sign-in to make superusers on my other problem. Sometimes I get lucky.

Thanks,
Ray

10 Feb 2013, 3:40 AM
#6
drbyte avatar

drbyte

Sensei

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

Post #6 by drbyte

rayw1679:

PHP Parse error: syntax error, unexpected '{' in /.../store/includes/functions/password_funcs.php on line 102
In what way is that file different from original Zen Cart code, and why?

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

10 Feb 2013, 4:41 AM
#7
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #7 by rayw1679

Thank you for responding, DrByte. Winmerge says it's identical to what I originally downloaded. The code is:

  // MS-Windows platform?
  if (@class_exists('COM'))
  {
    // http://msdn.microsoft.com/en-us/library/aa388176(VS.85).aspx
    try
    {
      $CAPI_Util = new COM('CAPICOM.Utilities.1');
      $entropy .= $CAPI_Util->GetRandom(16, 0);

      if ($entropy)
      {
        $entropy = md5($entropy, TRUE);
        //echo "USING WINDOWS" . "<br>";
      }
    } catch (Exception $ex)
    {
      // echo 'Exception: ' . $ex->getMessage();
    }
  }

According to Notepad++, line 102 is the left bracket under "try". I'm sorry, I read several languages, but PHP isn't one of them. I don't mind trying what you suggested earlier, I just want to make sure it matches the error, as I get nervous when modifying the database.

Thanks,
Ray

10 Feb 2013, 4:41 AM
#8
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #8 by rayw1679

Sorry, this was another duplicate. I hit "quick reply" and get duplicate entries. I don't know why.

Thanks,
Ray

10 Feb 2013, 4:52 AM
#9
drbyte avatar

drbyte

Sensei

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

Post #9 by drbyte

No PHP error there. Not sure why it's throwing an error, unless the file is damaged.

When you're using PHP 5.4, what is your PHP configuration setting for each of these?

  • session.hash_bits_per_character
  • session.hash_function

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

10 Feb 2013, 5:24 AM
#10
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #10 by rayw1679

5.4.11 is the same as 5.2.17:

session.hash_bits_per_character are 4 for local and master
session.hash_function are 0 for both

Thanks,
Ray

10 Feb 2013, 5:49 AM
#11
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #11 by rayw1679

I re-copied the file from the original download, just in case the file on the server had been damaged (as you suggested). When I went to 5.4, I got the "loading" circle and then back to the sign-in. When I went back to 5.2, I was able to sign-in. In short, same as before.

I checked the logs, and received the same error as before, plus this one (this is the same message I've been occasionally getting for a while ... I assumed it was related to the "A" character I've seen):
[05-Feb-2013 11:12:51] PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /homepages/5/d232125156/.../store/admin.../includes/modules/product/collect_info.php on line 401

Thanks,
Ray

10 Feb 2013, 5:05 PM
#12
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,146
Plugin Contributions:
56

Post #12 by lat9

A couple of questions:

  1. What collation is being used by your Zen Cart database? Use the phpMyAdmin (aka MySQL Administration in your 1and1 admin).
  2. What locale is being set for your admin. Look in /YOUR_ADMIN/includes/languages/english.php (ca. line 21).
    If they're not the same (e.g. if your database collation is latin1_<something> and your locale is being set to 'en_US.UTF-8'), then that's a problem. If your database is a latin1 collation, you could try changing your admin's (and eventually your store's, too) english.php file to use:
setlocale(LC_TIME, 'en_US.ISO_8859-1');
10 Feb 2013, 6:23 PM
#13
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #13 by rayw1679

Thank you, lat9. I assume you're referring to the message about characters, which I thought might be related to sign-in problem. I didn't realize until after I posted it that it was several days old. While that's a problem, the ability to sign-in is paramount at this point.

The @setlocale is what it had. I changed the CHARSET from utf-8 to 'iso-8859-1' to alleviate some of the strange characters. I tried "latin1," but that got errors, so I changed it to "iso-8859-1".
@setlocale(LC_TIME, 'en_US')
define('CHARSET', 'iso-8859-1');

I couldn't find collation in MYPHPADMIN, but my database backup file includes:
DEFAULT CHARSET=latin1

As for the sign-in problem, I have several stores (my wife and daughter enjoy selling their crafts), in addition to our main store, which is our livelihood. They all work fine on PHP 5.2, but all do the same thing on 5.4 -- I get no error messages, even if I enter an incorrect password. It just reloads the sign-in screen.

Also, I don't know if Zen-cart waits until getting a certain number of records before writing to the "cache" file, but only my main store has recorded the syntax error. It's doubtful the other stores have been used since I made the quick test this morning, as they don't get much traffic. The main store gets a LOT of traffic. (Again, the error is identical -- it just reloads the sign-in page when using 5.4.)

DrByte -- I asked 1and1 about the key session lengths, and they told me to look at phpinfo. I did, but I couldn't find it. I have loaded both reports on my server, if you'd be willing to look at them: http://rdswebs.net/drbyte

If I need to modify the database and programs as per the post above, I'll be glad to. Please let me know. I have to fix these or move them to another host that supports PHP 5.2.

Thanks,
Ray

10 Feb 2013, 7:14 PM
#14
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,146
Plugin Contributions:
56

Post #14 by lat9

I'm running my website on 1and1 using PHP 5.4 and Zen Cart v1.5.1 with no problems. You can find the collation that your database is using by going to your 1and1 admin's MySQL Administration and then click the "phpMyAdmin" button next to your Zen Cart database. Once phpMyAdmin loads, make sure that your Zen Cart database is selected and scroll down and select the product_description table. Click on the product_description link; you'll be presented with a screen that shows the layout of that table and one of the columns is the Collation. I'm guessing that the collation is a latin1_<something> value. If that's the case, then you need to make sure that the settings in the following files all reflect that:

/YOUR_ADMIN/includes/languages/english.php and /includes/languages/YOUR_TEMPLATE/english.php:

@setlocale(LC_TIME, '.en_US.ISO_8859-1')
...
define('CHARSET', 'iso-8859-1');

/YOUR_ADMIN/includes/configure.php and /includes/configure.php

define('DB_CHARSET', 'latin1');

P.S. Starting with Zen Cart v1.5.1, the debug log files are written to the /logs directory instead of /cache.

10 Feb 2013, 7:48 PM
#15
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #15 by rayw1679

Thank you, lat9. It is latin_swedish_ci. My configure files were updated, but my english.php file had "utf-8." That probably fixed my character problem.

Are you on a managed server with 1and1?

Unfortunately, I still can't sign on. I must be doing something stupid if you're running PHP 5.4 and it's working. How did you test for PHP 5.4?

I modified my .htaccess file in the root of my server to change to 5.4 as follows (I changed the "#" from 6 to 5 on the first two):
#AddType x-mapp-php5 .php
AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php

As soon as I switch back to the old .htaccess file it works fine. This is absolutely driving me crazy. Any suggestions will be appreciated more than you can imagine.

Thanks,
Ray

10 Feb 2013, 8:07 PM
#16
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,146
Plugin Contributions:
56

Post #16 by lat9

My store is installed in a subdirectory of my account; the .htaccess file in that directory contains

AddHandler x-mapp-php6 .php

but not

AddType x-mapp-php6 .php

When you say that you "still can't sign on", what does that mean? Are there error messages? Are there debug log files?

10 Feb 2013, 8:30 PM
#17
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #17 by rayw1679

Thank you. I remove the AddType from the .htaccess file. I have updated both english.php files.

When I try to sign-in on 5.4, I get the "loading" icon and then the same screen again -- no errors. Even if I put a bad password in, it doesn't give me an error. Earlier, I was getting the following error on the store where I just changed the english.php file, but it didn't give it to me this time: PHP Parse error: syntax error, unexpected '{' in /.../store/includes/functions/password_funcs.php on line 102. This was in store/cache file; if there are other places to look, I don't know about them. I don't get involved with Zen-cart but every 2 - 3 years when I have to upgrade, and I've never had this many problems. This happens with all my stores, but they run fine on PHP 5.2.

Thanks,
Ray

10 Feb 2013, 8:38 PM
#18
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,146
Plugin Contributions:
56

Post #18 by lat9

Are you, by chance, using a Windows hosting package? I'm having no problems with the 1and1 Linux package.

Also, could you post your copy of the password_funcs.php file?

10 Feb 2013, 9:02 PM
#19
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Post #19 by rayw1679

No, it's a Unix server. If I did it correctly, the file will be attached as a zip.

Thanks,
Ray

10 Feb 2013, 9:18 PM
#20
drbyte avatar

drbyte

Sensei

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

Post #20 by drbyte

rayw1679:

Also, I don't know if Zen-cart waits until getting a certain number of records before writing to the "cache" file, but only my main store has recorded the syntax error.
I regret ever dumping debug logs into the "cache" folder because people think the logs are actually cached, or that there's some sort of delay involved. There's not.
The choice to use the "cache" folder was ONLY so that people didn't have to create "yet another" writable folder for logs to be dumped into. But, due to the confusion (and for other beneficial reasons), logs have been relocated to the /logs/ folder since v1.5.1

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