Forums / General Questions / Blank Page all of a sudden

Blank Page all of a sudden

Started by gabstero on 19 Feb 2014, 5:02 PM · Views: 1,344

Results 1 to 9 of 9
19 Feb 2014, 5:02 PM
#1
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Blank Page all of a sudden

Hi Gang!

Everything was working just fine till today when I discovered that every page in my zencart gives a blank page (https://www.gabkits.com)
I found these errors in the php error logs:

[19-Feb-2014 09:51:23 America/Denver] PHP Deprecated: Function ereg() is deprecated in /home2/photogab/public_html/gabkits/includes/classes/db/mysql/query_factory.php on line 177
[19-Feb-2014 09:51:23 America/Denver] PHP Fatal error: Cannot redeclare date_diff() in /home2/photogab/public_html/gabkits/includes/functions/functions_general.php on line 1455

Also my server upgraded to php version 5.4 (from 5.2). But I asked them to downgrade so we can check if the site works but it didn't.

Can you please give me some clue on where to start poking?

thanks a lot!
gabstero

19 Feb 2014, 5:31 PM
#2
lat9 avatar

lat9

Administrator

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

Re: Blank Page all of a sudden

You should start by seriously considering upgrading your site from Zen Cart v1.3.8a to v1.5.1 (or later).

19 Feb 2014, 5:33 PM
#3
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Blank Page all of a sudden

that's what I fear from :-)

19 Feb 2014, 5:35 PM
#4
lat9 avatar

lat9

Administrator

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

Re: Blank Page all of a sudden

When your webhost restores your site to use PHP 5.2, what messages are logged?

19 Feb 2014, 5:47 PM
#5
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Blank Page all of a sudden

Thanks -

Looks like the same ones when I switch back to php 5.2. I checked those error lines and this is what they show:

  1. includes/classes/db/mysql/query_factory.php on line 177:
175 if ($zp_result_array) {
176          while (list($key, $value) = each($zp_result_array)) {
177            if (!ereg('^[0-9]', $key)) {
178              $obj->fields[$key] = $value;
179            }
180          }
  1. includes/functions/functions_general.php on line 1455:
1454    return(round(($date2_set-$date1_set)/(60*60*24)));
1455  }

thanks!

19 Feb 2014, 9:10 PM
#6
lat9 avatar

lat9

Administrator

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

Re: Blank Page all of a sudden

That shouldn't be, since ereg wasn't deprecated for PHP 5.2. Create a file with a secret name (with file extension .php) that contains:

phpinfo();

Copy that file to your root, open your browser and go to www.gabkits.com/<secret name>.php. Towards the top of the display, you should see what PHP version is actually being used; I'm guessing that it's not really PHP 5.2. When you've created the output, delete the file.

19 Feb 2014, 9:19 PM
#7
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Blank Page all of a sudden

It turns out that indeed the php 5.4 upgrade was the issue. When I tried previously to revert to 5.2 it didn't work because for some reason the .htaccess had the following line up top (possibly added by the host when they automatically upgraded to 5.4):

AddHandler application/x-httpd-php54 .php

All well now. At least for a while since they will be phasing out 5.2. This might be a good time to upgrade the site :-)

thanks a lot for help!
g

20 Feb 2014, 1:11 PM
#8
lat9 avatar

lat9

Administrator

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

Re: Blank Page all of a sudden

No problem, I'm glad you got it sorted out ... and thanks for letting us know what the issue was.

20 Feb 2014, 5:54 PM
#9
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Blank Page all of a sudden

Sure - no problem - thanks for help!