Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Server PHP5 refresh issue! Admin redirects to Itself and can't add products to cart

Server PHP5 refresh issue! Admin redirects to Itself and can't add products to cart

Locked

Started by davemehta on 31 Mar 2009, 10:30 AM · Views: 2,590

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
31 Mar 2009, 10:30 AM
#1
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Post #1 by davemehta

My store is hosted on Mosso and the only tweak I had to do originally for that was change (when I first installed it a LONG time ago) the server's REMOTE_ADDR string to show a CLUSTERED string to get the proper IP of a visitor... other than that the setup is the same as any other host.

Having said that, they recently upgraded/refreshed their PHP5 and that has caused me a nightmare. First it was because it set the permissions of my configure.php fie to 644 and I was getting an error in the store. I quickly changed the permissions back to 444 (for both the main configure.php file and the one in the admin/includes folder as well). Here's a document on the upgrade changes they made: http://help.mosso.com:80/article.php?id=362 ... highlights include:

REMOTE_ROOT set to server directory on old ... REMOTE_ROOT set to customer directory on new
REMOTE_ADDR set to load-balancer on old ... IP REMOTE_ADDR set to remote IP on new
Default Charset Latin1 on old ... Default Charset UTF-8 on new
Register Globals On on old ... Register Globals Off on new
Files owned by Apache user www-data on old ... Files owned by user on new
Old rewrite rules on old ... New rewrite introduced by Apache on new
dlopen() allowed on old ... dlopen() not allowed on new
Remote includes allowed on old ... Remote includes not allowed on new
mail() –f switch required on old ... mail() return-path as user on new

I can't login to the admin because it just refreshes back to the login page. I've tried the fix_cache_key tool and that didn't help. Also, I can't add a product to the cart from the store.

From what I've been reading this has to be a SESSIONS issue but not sure how to resolve it or what change from the list above is causing the issue. Remember, that the attributes on my configure.php file were "mysteriously" switched to 644 during the "upgrade" so it could have changed the permissions on any file to 644, so that could be an issue as well.

31 Mar 2009, 8:27 PM
#2
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Post #2 by davemehta

:-( Boooo, no one? I really am at a loss here and need some dire help :-(

31 Mar 2009, 8:47 PM
#3
drbyte avatar

drbyte

Sensei

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

Post #3 by drbyte

You haven't indicated what version of Zen Cart you're using, etc.

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

31 Mar 2009, 8:51 PM
#4
drbyte avatar

drbyte

Sensei

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

Post #4 by drbyte

davemehta:

REMOTE_ROOT set to server directory on old ... REMOTE_ROOT set to customer directory on newSo, make sure your paths are correct in your configure.php files.
davemehta:

REMOTE_ADDR set to load-balancer on old ... IP REMOTE_ADDR set to remote IP on newThis probably means whatever you did to your old site to handle their old config can be undone.
davemehta:

Default Charset Latin1 on old ... Default Charset UTF-8 on newIf you're running an english-only site, this should not be a problem.> davemehta:

Register Globals On on old ... Register Globals Off on newZen Cart prefers RG=OFF> davemehta:

Files owned by Apache user www-data on old ... Files owned by user on newYou may have some permissions issues to keep an eye on.
The only part of that which might affect sessions would be the /cache/ folder.> davemehta:

Old rewrite rules on old ... New rewrite introduced by Apache on newOnly affected by rewrite addons, not by core of ZC> davemehta:

dlopen() allowed on old ... dlopen() not allowed on new
Remote includes allowed on old ... Remote includes not allowed on newNot used by Zen Cart
davemehta:

mail() –f switch required on old ... mail() return-path as user on newSo, set your Email Transport method to PHP in Admin->Config->Email Options

davemehta:

I can't login to the admin because it just refreshes back to the login page. I've tried the fix_cache_key tool and that didn't help. Also, I can't add a product to the cart from the store.

From what I've been reading this has to be a SESSIONS issue but not sure how to resolve it or what change from the list above is causing the issue.Yes, it's definitely a sessions problem.

davemehta:

Remember, that the attributes on my configure.php file were "mysteriously" switched to 644 during the "upgrade" so it could have changed the permissions on any file to 644, so that could be an issue as well.
That shouldn't affect session 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.

31 Mar 2009, 8:53 PM
#5
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Post #5 by davemehta

It's happening to two stores, one an older one I meant to update which is 1.2.6d and then a newley updated 1.3.8. Since the store was working fine before the upgrade I am sure it's just some file that has a 644 set that could be causing this or is one of the noted items for the PHP upgrade... I'm just not sure what exactly! As far as add in's it's just ImageHandler. PM me for website(s) addresses.

Thanks!

31 Mar 2009, 9:01 PM
#6
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Post #6 by davemehta

Dr Byte, Thanks so much for the input!

  1. REMOTE_ROOT set to server directory on old ... REMOTE_ROOT set to customer directory on new. So, make sure your paths are correct in your configure.php files.
    Correct paths.
  1. REMOTE_ADDR set to load-balancer on old ... IP REMOTE_ADDR set to remote IP on new. This probably means whatever you did to your old site to handle their old config can be undone.
    Haven't changed this variable back yet, because i'm going to have to download the site and do a search for the old variable and replace it with the standard one again, but I don't think this could cause that issue. Will try this as the last step in all my testing though!
  1. Default Charset Latin1 on old ... Default Charset UTF-8 on new. If you're running an english-only site, this should not be a problem.
    Agreed.
  1. Register Globals On on old ... Register Globals Off on new. Zen Cart prefers RG=OFF.
    Well that means that this changed, but Zen cart prefers this setting so this shouldn't be it.
  1. Old rewrite rules on old ... New rewrite introduced by Apache on new. You may have some permissions issues to keep an eye on. The only part of that which might affect sessions would be the /cache/ folder.
    Cache folder set to 777, so that should be fine. Is there any other file you know of that could have a permission changed from 444 to 644 and cause a blow-up like this? I think this is where the problem may lie!
  1. dlopen() allowed on old ... dlopen() not allowed on new. Remote includes allowed on old ... Remote includes not allowed on new. Only affected by rewrite addons, not by core of ZC.
    ImageHander is only add-on, I don't think that would cause the admin login and add to cart errors though, ya think?
  1. Yes, it's definitely a sessions problem.
    Hmmmm, still confused on what to try next!
31 Mar 2009, 9:30 PM
#7
drbyte avatar

drbyte

Sensei

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

Post #7 by drbyte

Apart from the cache folder being a critical piece, I don't see any immediate reason for the other "changes" to be direct contributing factors.

Related FAQ on session issues: https://www.zen-cart.com/tutorials/index.php?article=281

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

31 Mar 2009, 9:32 PM
#8
drbyte avatar

drbyte

Sensei

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

Post #8 by drbyte

Oh, and, worth noting, v1.3.6 and older will have PHP5 problems related to sessions.
And v1.2.x will have problems with MySQL 5

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

1 Apr 2009, 7:14 PM
#9
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Post #9 by davemehta

Dr Byte, thanks for all the help it was much appeciated.

Just a note of what I did in case anyone ever faces this in the future: I unfortunately could not find the resolution to my issue so I just moved the site over to a new server, installed a brand new copy of 1.3.8a and then used the database to "upgrade" to that new version during install. Now I have the new version, on a new server and everything seems to be working fine. Just a lot of time redoing template files and such, but glad this is behind me. :-)

2 Apr 2009, 3:53 AM
#10
drbyte avatar

drbyte

Sensei

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

Post #10 by drbyte

:thumbsup: A proper upgrade is always advisable when running into incompatibilities such as a PHP version change.

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