Forums / Upgrading to 1.5.x / After upgrading from 1.38a to 1.54 users can't access orders.

After upgrading from 1.38a to 1.54 users can't access orders.

Views: 2,109

Results 1 to 15 of 15
7 Jan 2015, 8:20 PM
#1
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

After upgrading from 1.38a to 1.54 users can't access orders.

PHP 5.4, zencart 5.4.

When logged in as an admin i can access everything but the other users can't access the orders. When they click on the customers name it goes to a blank page. It works fine under the admin profile. I created a new profile called standard user and checked EVERYTHING and it didn't make a difference. However if I give a standard user the superuser profile they can access it without issues. But I want to limit these users from accessing everything.

Is there any fix for this?

7 Jan 2015, 8:30 PM
#2
lat9 avatar

lat9

Administrator

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

Re: After upgrading from 1.38a to 1.54 users can't access orders.

welchyboy:

PHP 5.4, zencart 5.4.

When logged in as an admin i can access everything but the other users can't access the orders. When they click on the customers name it goes to a blank page. It works fine under the admin profile. I created a new profile called standard user and checked EVERYTHING and it didn't make a difference. However if I give a standard user the superuser profile they can access it without issues. But I want to limit these users from accessing everything.

Is there any fix for this?
Going to a blank page (i.e. whitescreen) indicates that there's a myDEBUG-adm-xxxx.log file waiting to tell you what's really going on. You could post the contents (using the "code" tags, the **# **in the post-writing menu) of one of those files and someone can help further. When you post the contents of an -adm- type debug log, make sure to xxx-out the name of your secret admin folder's name!

7 Jan 2015, 9:22 PM
#3
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

Re: After upgrading from 1.38a to 1.54 users can't access orders.

lat9:

Going to a blank page (i.e. whitescreen) indicates that there's a myDEBUG-adm-xxxx.log file waiting to tell you what's really going on. You could post the contents (using the "code" tags, the **# **in the post-writing menu) of one of those files and someone can help further. When you post the contents of an -adm- type debug log, make sure to xxx-out the name of your secret admin folder's name!

Ahh thanks that helps...I still don't get it but maybe someone can help. I see the problem but not sure where to change it.

[01-Jan-2015 13:26:20] PHP Parse error: syntax error, unexpected T_STATIC in /home/stxmill/public_html/testzen/XXXX/includes/classes/class.admin.zcObserverLogEventListener.php on line 118

The testzen folder no longer exists and itsn't where the site is anymore. I have changed both configure.php files but not sure where this is coming from.
Any thoughts?

7 Jan 2015, 9:36 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: After upgrading from 1.38a to 1.54 users can't access orders.

welchyboy:

[01-Jan-2015 13:26:20]
That's from January 1.

Need to look at the more recent MyDebug-adm-xxxxx.log files instead.

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

7 Jan 2015, 9:40 PM
#5
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

Re: After upgrading from 1.38a to 1.54 users can't access orders.

Sorry I am a moron lol.

[07-Jan-2015 14:13:48 America/Chicago] PHP Fatal error: Call to undefined function check_page() in /home/stxmill/public_html/XXXX/includes/init_includes/overrides/init_admin_auth.php on line 52

This is the line it is talking about

  if (check_page($page, $_GET) == FALSE)
7 Jan 2015, 9:49 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: After upgrading from 1.38a to 1.54 users can't access orders.

The /admin/includes/init_includes/**overrides/ **folder is used by plugins which want to replace the normal functionality of the files by the same name in the parent folder.

So, which plugin are you using that provided that override file for you? Is that plugin compatible with the new ZC version you're using? Is it possible that the functionality for that plugin was already built-in to v1.5.4?
Try simply deleting that file from the overrides folder, and normal built-in functionality will be restored. But whatever that plugin was attempting to do might not work, so you'd have to sort that out separately.

Or, maybe the plugin is also expecting another set of functions in a functions file that you've not yet installed?

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

7 Jan 2015, 10:12 PM
#7
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

Re: After upgrading from 1.38a to 1.54 users can't access orders.

I renamed the file to init_admin_auth.php.old and tried to go to the admin page and login....now the whole login page is white. I am not sure exactly what modules have been installed....We haven't made changes to the site since 1.38.

[07-Jan-2015 16:10:49 America/Chicago] PHP Warning: require(includes/init_includes/init_admin_auth.php): failed to open stream: No such file or directory in /home/stxmill/public_html/includes/autoload_func.php on line 48
[07-Jan-2015 16:10:49 America/Chicago] PHP Warning: require(includes/init_includes/init_admin_auth.php): failed to open stream: No such file or directory in /home/stxmill/public_html/includes/autoload_func.php on line 48
[07-Jan-2015 16:10:49 America/Chicago] PHP Fatal error: require(): Failed opening required 'includes/init_includes/init_admin_auth.php' (include_path='.:/opt/php54/lib/php') in /home/stxmill/public_html/includes/autoload_func.php on line 48

8 Jan 2015, 2:06 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: After upgrading from 1.38a to 1.54 users can't access orders.

welchyboy:

I renamed the file to init_admin_auth.php.old and tried to go to the admin page and login....now the whole login page is white. I am not sure exactly what modules have been installed....We haven't made changes to the site since 1.38.

How do you not know what modules are installed onur new ZC 1.5.4 site that was just upgraded from 1.3.8? Did you not follow instructions similar to: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

Sorry to be blunt about that, but seems very contrary to any standard process of upgrading and would definitely explain why there are problems now..

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

8 Jan 2015, 2:45 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: After upgrading from 1.38a to 1.54 users can't access orders.

welchyboy:

[07-Jan-2015 14:13:48 America/Chicago] PHP Fatal error: Call to undefined function check_page() in /home/stxmill/public_html/XXXX/includes**/init_includes/overrides/init_admin_auth.php** on line 52
welchyboy:

I renamed the file to init_admin_auth.php.old and tried to go to the admin page and login....now the whole login page is white. I am not sure exactly what modules have been installed....We haven't made changes to the site since 1.38.

[07-Jan-2015 16:10:49 America/Chicago] PHP Warning: require(includes/init_includes/init_admin_auth.php): failed to open stream: No such file or directory

Take a look at the paths in the two posts you made. The first one was referring to the file inside the folder named "overrides", and THAT is where "check_page" error was happening.

So, you renamed the WRONG file when testing.

I'll spell it out: temporarily rename or delete the /home/stxmill/public_html/XXXX/includes**/init_includes/overrides/**init_admin_auth.php file. (and put back the other one you renamed incorrectly.

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

8 Jan 2015, 4:15 AM
#10
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

Re: After upgrading from 1.38a to 1.54 users can't access orders.

mc12345678:

How do you not know what modules are installed onur new ZC 1.5.4 site that was just upgraded from 1.3.8? Did you not follow instructions similar to: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

Sorry to be blunt about that, but seems very contrary to any standard process of upgrading and would definitely explain why there are problems now..

Well mc12345678 as much as I appreciate your comment i don't think it helped the situation in any way...but thanks for posting anyways :-)

What I did to upgrade the site was to duplicate the folder and rename it on the same server, change the two configure.php files to point to the new location and upgraded the database. Then I worke dwith DrByte to fix a few files that weren't working correctly.

I am sorry DrByte but apparently we are having a communication issue. Let me explain in more detail of what exactly I am doing because I am apparently missing something.

The issue which was brought to me by the customer is when the click on a new order it comes up to a blank white page but it works when the admin is logged in. I started a post and posted the error which was

[07-Jan-2015 14:13:48 America/Chicago] PHP Fatal error: Call to undefined function check_page() in /home/stxmill/public_html/XXXX/includes/init_includes/overrides/init_admin_auth.php on line 52

You told me...
Try simply deleting that file from the overrides folder, and normal built-in functionality will be restored. But whatever that plugin was attempting to do might not work, so you'd have to sort that out separately.

So instead of deleting init_admin_auth.php to init_admin_auth.php which is what I thought you meant.

Then you replied
I'll spell it out: temporarily rename or delete the /home/stxmill/public_html/XXXX/includes/init_includes/overrides/init_admin_auth.php file. (and put back the other one you renamed incorrectly.

Which I took as I wasn't sure how to take so just to test I renamed the overrides folder to overrides.old. This also resulted in a blank white page. I'm not sure how else to explain exactly what i did or what I might be missing. Hopefully this helps you to better understand what I did.

8 Jan 2015, 5:29 AM
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,858
Plugin Contributions:
18

Re: After upgrading from 1.38a to 1.54 users can't access orders.

What I did to upgrade the site was to duplicate the folder and rename it on the same server, change the two configure.php files to point to the new location and upgraded the database. Then I worke dwith DrByte to fix a few files that weren't working correctly.If what you are saying is that you copied the 1.3.8 files to a new folder, this is NOT a recommended method for upgrade.:(
It's also the answer to the questions asked about "how did you upgrade".
1.3.8 is ancient, and trying to use 1.5.4 configure.php files with 1.3.8 files is NEVER going to work right. I wouldn't want to count how many files have been changed since then.
MC was trying to steer you in the right direction when he posted the link http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading. That post was created by DrByte and is the best to use when moving from 1.3.# To 1.5.#.
Unfortunately, you may never be able to fully recover without starting over using http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading as a guide.
Hopefully you have a backup of the original site and its database.
Let us know if you have questions about anything at http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading and we will try to help.:yes:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Jan 2015, 10:39 AM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: After upgrading from 1.38a to 1.54 users can't access orders.

DrByte:

Take a look at the paths in the two posts you made. The first one was referring to the file inside the folder named "overrides", and THAT is where "check_page" error was happening.

So, you renamed the WRONG file when testing.

I'll spell it out: temporarily rename or delete the /home/stxmill/public_html/XXXX/includes**/init_includes/overrides/**init_admin_auth.php file. (and put back the other one you renamed incorrectly.

welchyboy:

[07-Jan-2015 14:13:48 America/Chicago] PHP Fatal error: Call to undefined function check_page() in /home/stxmill/public_html/XXXX/includes/init_includes/overrides/init_admin_auth.php on line 52

You told me...
Try simply deleting that file from the overrides folder, and normal built-in functionality will be restored. But whatever that plugin was attempting to do might not work, so you'd have to sort that out separately.

So instead of deleting init_admin_auth.php to init_admin_auth.php which is what I thought you meant. What init_admin_auth.php file was renamed by you? Was it includes/init_config/init_admin_auth.php, or was it includes/init_config/overrides/init_admin_auth.php
I understand that the includes/init_config/overrides folder has now been renamed from the below statement, but we are/were trying to figure out the status of and suggest restoring the original ZC 1.5.4 version of includes/init_config/init_admin_auth.php.

Then you replied
I'll spell it out: temporarily rename or delete the /home/stxmill/public_html/XXXX/includes/init_includes/overrides/init_admin_auth.php file. (and put back the other one you renamed incorrectly.

Which I took as I wasn't sure how to take so just to test I renamed the overrides folder to overrides.old. This also resulted in a blank white page. I'm not sure how else to explain exactly what i did or what I might be missing. Hopefully this helps you to better understand what I did.

So, the report that ZC 1.3.8 was upgraded to 1.5.4 is that someone else performed the upgrade and now you have been called in to troubleshoot the errors that resulted from their upgrade. Is that a correct summary?

At that point I would suggest comparing a vanilla install with the hosted version of the files and try to understand first why any core files are different, and second if the overrides in any directory template or just like this folder are accurate or point to other correct code...but that just me. (Well, and perhaps a few others that do this type of thing routinely)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

8 Jan 2015, 3:00 PM
#13
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

Re: After upgrading from 1.38a to 1.54 users can't access orders.

mc12345678 I renamed the init_admin_auth.php file located in the overrides folder. includes/init_config/overrides/init_admin_auth.php.
I am the original person to install 1.38a many many years ago and due to some hacking issues and other vulnerabilities I needed to upgrade the site. So I was also the one who upgraded the site. As of right now the site seems to be working normally with exception to a "standard" user not being able to access the orders. I just don't get why the administrator or any user in the superuser profile can access it but a standard user can't. I guess I can just make the people who work with orders and stuff have superusers rights...that just scares me because who knows what they might change. I constantly back up so if something is changed I could always go back to a backup.

I don't recall all the modifications and plugins that were on the original site as it was built by me many years ago and hasn't been customized since....I don't get why copying and overwriting the 1.54 files over the 1.38a files wouldn't work...and then upgrade the database to 1.54. But i just don't know...i am not an expert and definitely don't claim to be lol. I am just hoping there is an easy was to fix this issue for the users that are not in the superuser profile...but if not I guess I will give them the superuser access.

8 Jan 2015, 4:04 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: After upgrading from 1.38a to 1.54 users can't access orders.

Overwriting the files without deleting other files that are no longer applicable is similar to performing a renovation of a room where say a new electrical component is being added without replacing the electrical wiring or circuit breaker (fuse) feeding that component with one that is sized appropriately. Okay maybe not a perfect example, but the concept is that the electricity is fed to the component, but if the electricity can’t get to the component because the wire will catch fire, the breaker will flip or the fuse will blow is a situation where the system has not been looked at as a whole. Sure the plug for the electrical component will fit into the existing or new power socket, but everything that it needs to operate will not be there.

So with regards to ZC 1.3.8, there was no user profile option provided out of the box. That extra feature required the installation of an additional add-on/plug-in. By overwriting files without removing unnecessary files, then some of the files added by that administrator plugin are still present wherever they were installed and not overwritten by ZC 1.5.4. In some cases, files in such directories are loaded whether they are called upon or not (includes/init_includes is an example) when they have an extension of .php.

So, there are two things likely at play here….

One the software that was installed to support giving access to the “other” users is likely still installed based on the description of how the upgrade was performed and is possibly/likely conflicting with the software included in ZC 1.5.x that handles admin profiles.

The other thing that I have seen upon upgrade of some 1.3.x systems is that the admin_profile of existing users sometimes is a value of 0 instead of at least a value of 1 upon upgrade. This information can be reviewed in phpmyadmin in the admin table that contains the DB_PREFIX applicable to the store(s) in question (DB_PREFIX . ‘admin’).
Suggestion if not going to perform an upgrade in accordance with posted guidelines would be to identify the files associated with that plugin and remove the files that were not upgraded/revised/replaced by the ZC 1.5.4 install. If files were merged, then to undo the merge applicable to that plugin provided that the information to be removed isn’t still applicable to ZC 1.5.4… Yes… This gets messy which is why the guidelines have been provided on how to do an upgrade from 1.3.x to 1.5.x as that is far smoother/easier to perform than the above…

I have also had to recreate admin profiles even after adjusting the admin_profile value to allow login... Perhaps bad of me for not capturing the issue(s) in the forum, I just trudge along with that portion of the upgrade because it is in a way something covered by: http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it) and therefore in my performing these things I have not considered it a bug. Not to mention the majority of the sites I've upgraded I had no interaction with before the upgrade, so haven't done an in depth review of all that was incorrectly performed over the years, but can suggest following the posted instructions in the future and specifics about what was incorrectly performed or incorporated so that the store owner can make an assessment about how to move forward in the future.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

8 Jan 2015, 6:30 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: After upgrading from 1.38a to 1.54 users can't access orders.

Way too much text in the last several posts ... TL;DR.

What I meant in my last post was:

a) delete the /home/stxmill/public_html/XXXX/includes/init_includes**/overrides/init_admin_auth.php
b) put back
/home/stxmill/public_html/XXXX/includes/init_includes/init_admin_auth.php **(instead of renaming it to .old)

Basically, ZC normally only has ONE: /admin/includes/init_includes/init_admin_auth.php file. The others you've talked about should be deleted if you want it to work as it's supposed to out-of-the-box.

Then once it's working normally, figure out why you had an override file in the first place (ie: plugin, old obsolete addon, whatever), and if necessary make relevant changes to add the functionality it was supposedly giving you.

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