Forums / Bug Reports / Page not found when incorrect EZPage link

Page not found when incorrect EZPage link

Views: 2,169

Results 1 to 20 of 23
21 Jul 2014, 12:15 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Page not found when incorrect EZPage link

It's throwing an error when you try to access an incorrect/deactivated ezpages link.

[21-Jul-2014 10:50:00 UTC] PHP Parse error: syntax error, unexpected $end in /home/domain/public_html/domain.com/1_5_3/includes/templates/classic/common/tpl_main_page.php on line 196

It's doing it on both sites I'm working with but not the default installation. Since both sites are very different, it looks like a bug to me. Someone needs to test it on a default installation. Line 196 is the body tag.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Jul 2014, 1:21 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

So far, I cannot reproduce the error log that you are showing but I can reproduce a blank white page ...

What happens if you comment out line 39 in:
/includes/modules/pages/header_php.php

if ($var_pageDetails->EOF) {
  require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
  $messageStack->add_session('header', ERROR_PAGE_NOT_FOUND, 'caution');
  header('HTTP/1.1 404 Not Found');
[B]//[/B]  header('Status: 404 Not Found');
  zen_redirect(zen_href_link(FILENAME_DEFAULT));
}

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Jul 2014, 1:37 PM
#3
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

That does give me a blank EZpage with the breadcrumb so no error. So did I muck up something?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Jul 2014, 1:39 PM
#4
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Page not found when incorrect EZPage link

I've been caught with the deactivated EZpages because we actually used them while deactivated.

I recall reading something in the change logs about something being done to the way EZpages are handled which requires them to have at least one active button or you get the error you are talking about.

We're having to redo quite a few EZpages formatting and sort orders to accomodate our particular use due to the change. It forces them to appear in an EZpages ToC and the ToC formatting plays havoc in responsive templates.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

21 Jul 2014, 1:41 PM
#5
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

So you are saying this is not new in 1.5.3, Rick?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Jul 2014, 1:43 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

No, I do not believe so ... as I was getting the blank white page on a clean demo install and fudging the URL to inactive page numbers or non-existent page numbers ...

But, I will need to look into this further for the final solution ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Jul 2014, 1:46 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

RixStix:

I've been caught with the deactivated EZpages because we actually used them while deactivated.

If you really want to use the deactivated pages, you could look at the new code in the header_php.php and adjust it to allow them, despite the status settings ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Jul 2014, 1:51 PM
#8
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Page not found when incorrect EZPage link

delia:

So you are saying this is not new in 1.5.3, Rick?

My upgrade is from v1.3.9h to v1.5.3 so I am not sure when/where the change was made but I thought it was in the change logs.

CHANGE-425 - Fix for: Deleted ez-pages didn't trigger a 404 not found. Disabled pages were still reachable. Now sends to home page and shows message.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

21 Jul 2014, 1:56 PM
#9
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

Ah, good. Thanks, Ajeh!

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Jul 2014, 3:15 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

delia ... if you go to your Server Info in your admin and do a search for: fast do you see:
Server API CGI/FastCGI

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Jul 2014, 3:56 PM
#11
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

yes CGI/FastCGI

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Jul 2014, 4:14 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

thanks for the confirmation ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 4:43 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: Page not found when incorrect EZPage link

RixStix:

I recall reading something in the change logs about something being done to the way EZpages are handled which requires them to have at least one active button or you get the error you are talking about.
Um ... they've always required "at least one active 'button'" for as long as I can remember. That's definitely NOT "new" in the last 3 years.

But that's not the problem here.

What IS new is the detection of deleted/deactivated pages, as reflected in the code Ajeh mentioned earlier: http://www.zen-cart.com/showthread.php?214007-Page-not-found-when-incorrect-EZPage-link&p=1253317#post1253317

Not sure why exactly you're having the issue, as so much of the "wisdom" in the googleverse says to set both headers.
But, if yours is busted with it, you'll have to comment-out the line Ajeh highlighted.

.
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 Jul 2014, 11:23 AM
#14
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

This is a cpanel server - set up and standardized for Zen Cart specifically as another much larger zen cart hosting firm does. What is recommended if not Fast CGI?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

29 Jul 2014, 5:42 PM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

Are you using Apache or NGINX on your server?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 5:49 PM
#16
drbyte avatar

drbyte

Sensei

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

Re: Page not found when incorrect EZPage link

delia:

This is a cpanel server - set up and standardized for Zen Cart specifically as another much larger zen cart hosting firm does. What is recommended if not Fast CGI?

This question really goes much higher up than being a Zen Cart issue.

PHP can be installed 3 ways:

  • mod_php module (with Apache specifically)
  • FastCGI module (with Apache, nginx, IIS)
  • PHPFPM (with Apache, nginx, IIS)

While I've rarely used ZC with FPM, I've not had issues with any of these options. Granted, I don't test every single page in a ZC site every time I load up a server else I wouldn't have time for anything else! :)

Honestly I would expect any standard cPanel configuration to work 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 Jul 2014, 6:20 PM
#17
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

yeah, and I'm on apache - which my experience tells me is the one most often used.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

29 Jul 2014, 7:22 PM
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Page not found when incorrect EZPage link

Okay so you have:
Apache

you have:
FastCGI

And just for giggles and grins ... what version php are you using?
I'm trying to figure out how to recreate your exact same configuration so we can test this out. But need a lot more information.

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 7:36 PM
#19
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Page not found when incorrect EZPage link

Php 5.3.28

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

17 Aug 2014, 8:45 PM
#20
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Page not found when incorrect EZPage link

Ajeh:

If you really want to use the deactivated pages, you could look at the new code in the header_php.php and adjust it to allow them, despite the status settings ...

Did you mean to

comment out line 29 as instructed on line 28 of....

includes/modules/pages/page/header_php.php

Sorry, at the time I was not understanding your comment and it makes sense now. I wish I had not been quite so dense at that moment because it would have saved a bit of time.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com