Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Installing on a Linux/Unix Server / After upgrade to PHP 5.4, site displays a blank page..

After upgrade to PHP 5.4, site displays a blank page..

Started by divavocals on 17 Jan 2014, 4:25 AM · Views: 12,390

Results 1 to 20 of 31
17 Jan 2014, 4:25 AM
#1
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

After upgrade to PHP 5.4, site displays a blank page..

I'm stumped as to what the issue is.. I have seen in the Zen Cart Wiki that PHP 5.4 works with Zen Cart v1.5.1 with some patches.. I've seen some posts about the sessions.php file. is this the "patches" that are needed?? Are there other patches??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

17 Jan 2014, 4:39 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

I'm stumped as to what the issue is.. I have seen in the Zen Cart Wiki that PHP 5.4 works with Zen Cart v1.5.1 with some patches.. I've seen some posts about the sessions.php file. is this the "patches" that are needed?? Are there other patches??

While not able to find the similar thread from a few weeks ago or so that asked the same question, there is this thread started to address this:

http://www.zen-cart.com/showthread.php?211639-PHP-5-4-patch-list

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

17 Jan 2014, 5:29 AM
#3
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

I'm stumped as to what the issue is.. I have seen in the Zen Cart Wiki that PHP 5.4 works with Zen Cart v1.5.1 with some patches.. I've seen some posts about the sessions.php file. is this the "patches" that are needed?? Are there other patches??I have had this happen on 3 zen 1.5.1 sites when I switched to php 5.4.
I would switch back to php 5.3 and the website would work fine.

These were sites that had been around for several years and progressively upgraded to zen 1.5.1
php 5.4 finds that the password used for database access had been created with an older encryption method and it refused to access the database until I created a new database password.

I went into cpanel deleted the current user for the database
Created a new user (with the same name and database password)

Result: The sites worked immediately with php 5.4

It might not be your problem, but it worked for me.
It took a while to find this as there were no error log files.
Just a blank page.
I can't remember how I managed to find the error (it did show up eventually somewhere)

17 Jan 2014, 5:14 PM
#4
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

gilby:

I have had this happen on 3 zen 1.5.1 sites when I switched to php 5.4.
I would switch back to php 5.3 and the website would work fine.

These were sites that had been around for several years and progressively upgraded to zen 1.5.1
php 5.4 finds that the password used for database access had been created with an older encryption method and it refused to access the database until I created a new database password.

I went into cpanel deleted the current user for the database
Created a new user (with the same name and database password)

Result: The sites worked immediately with php 5.4

It might not be your problem, but it worked for me.
It took a while to find this as there were no error log files.
Just a blank page.
I can't remember how I managed to find the error (it did show up eventually somewhere)I'll give the password change a shot.. because at this point I'm desperate.. and like you I am getting NO error logs either.. Not sure this will work since the WordPress site shares the database with Zen Cart and it is having no issues..

I switched the live site back to PHP 5.2 so for now it's working, but this is a bandaid as HostMonster has said in one week they will be disabling PHP 5.2 support altogether.. Now I have a very short window to get this worked out on the dev site..

Grrrrrrrrrrrrr...............

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

17 Jan 2014, 11:44 PM
#5
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: After upgrade to PHP 5.4, site displays a blank page..

A few things I found on the web regarding this (possible) problem

www(dot)simplemachines.org/community/index.php?topic=491636.0 (see post 6)
forum(dot)mediatemple(dot)net/topic/7204-wordpress-upgrading-php-version-to-54/
discussion(dot)dreamhost(dot)com/thread-137852.html (post 6)

18 Jan 2014, 12:43 AM
#6
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

gilby:

A few things I found on the web regarding this (possible) problem

www(dot)simplemachines.org/community/index.php?topic=491636.0 (see post 6)
forum(dot)mediatemple(dot)net/topic/7204-wordpress-upgrading-php-version-to-54/
discussion(dot)dreamhost(dot)com/thread-137852.html (post 6)

I'll give the database reset a try after I try a few other things.. but the WordPress part of this site is working just fine.. all my issues are related to Zen Cart.. and they share the same DB..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 Jan 2014, 5:26 AM
#7
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

gilby:

A few things I found on the web regarding this (possible) problem

www(dot)simplemachines.org/community/index.php?topic=491636.0 (see post 6)
forum(dot)mediatemple(dot)net/topic/7204-wordpress-upgrading-php-version-to-54/
discussion(dot)dreamhost(dot)com/thread-137852.html (post 6)

Alas deleting and recreating the DB user did not solve the issue.. I wasn't hopeful this was the answer anyway since the WordPress part of the site is functioning fine..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 Jan 2014, 6:44 AM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

I'm stumped as to what the issue is..

Does the problem exist with the entire site, or is it just the backend or front end?

If you have SSL enabled, have you tried disabling it to see if the problem still exists?

Does the problem still exist if you revert back to the 'classic' template?

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

18 Jan 2014, 7:00 PM
#9
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

RodG:

Does the problem exist with the entire site, or is it just the backend or front end?

If you have SSL enabled, have you tried disabling it to see if the problem still exists?

Does the problem still exist if you revert back to the 'classic' template?

Cheers
RodG

  • Front-end issue. Admin works just fine.
  • SSL is not the issue as it exists on both the dev site (which does NOT have SSL enabled) and on the live site (which does have SSL enabled)
  • Removing the template brings the site back but generates LOTS of error messages from various add-ons (for example SNAF being one) because of missing files. I am confident these errors are unrelated to the root issue . (FYI.. I typically delete classic from my installs and replace it with the Barebones template.. I DESPISE Classic)

So yes I am looking at my installed add-ons among other things (like eliminating the server the site is hosted on as a possible contributing factor since all is well once I switch the site back to PHP 5.2)

Interestingly other clients with pretty much the same setup and add-ons are not having issues with PHP 5.4..

Anyway a fellow Zenner was kind enough to share the list of v1.5.1 mods/bugs/issues I asked after.. So I can at LEAST cross that off my list.. The lack of ANY error logs is what makes this a PITA..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 Jan 2014, 8:19 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

Anyway a fellow Zenner was kind enough to share the list of v1.5.1 mods/bugs/issues I asked after.. So I can at LEAST cross that off my list.. The lack of ANY error logs is what makes this a PITA..

Sharing back with the community to also help those that may be looking?

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

18 Jan 2014, 9:09 PM
#11
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

mc12345678:

Sharing back with the community to also help those that may be looking?

I will be happy to do so later..:smile: (it's in an external document) right now (as I'm sure you can understand) THIS is a bigger priority for me..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 Jan 2014, 10:21 PM
#12
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

  • Front-end issue. Admin works just fine.

Ahh... I didn't realize your problem was only with the front end.
The issue I had affected the entire site, front and back end, so it can't be the same as the problems I had.

Does your host give you the option of using php 5.3 as an interim (possible) solution?

18 Jan 2014, 10:48 PM
#13
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

gilby:

Ahh... I didn't realize your problem was only with the front end.
The issue I had affected the entire site, front and back end, so it can't be the same as the problems I had.

Does your host give you the option of using php 5.3 as an interim (possible) solution?
Unfortunately no.. it's PHP 5.4 or bust.. :laugh:

Like I said I was fairly certain it's wasn't the DB user thing for no other reason than WordPress was working just fine.. only the Zen Cart front end is mis-behaving..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 Jan 2014, 10:55 PM
#14
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

Unfortunately no.. it's PHP 5.4 or bust.. :laugh:

Like I said I was fairly certain it's wasn't the DB user thing for no other reason than WordPress was working just fine.. only the Zen Cart front end is mis-behaving..

Maybe a long shot, but do you have any php short tags in your code? Often those are disabled by default in php 5.4. My experencie is the can give white pages without error logs too

18 Jan 2014, 11:00 PM
#15
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

Design75:

Maybe a long shot, but do you have any php short tags in your code? Often those are disabled by default in php 5.4. My experencie is the can give white pages without error logs too

No shorttags.. Unfortunately I am out of ideas.. So I am going to re-build the test site from scratch.. Along the way I am going to find the add-on that is the cause of the issue.. I have two possible culprits in mind, and this exercise should confirm my suspicions.. I will totally report back my findings here and on the support thread(s) of any suspect add-ons..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

20 Jan 2014, 10:04 PM
#16
avibodha avatar

avibodha

New Zenner

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

Re: After upgrade to PHP 5.4, site displays a blank page..

It would really be good to see if error logging is working. Check your php.ini for error log location (or put phpinfo() into a page). Usually logs go to the cache folder so check there first. If not, maybe in apache logs, or system error log location.

You're really in the dark without error logs to tell you what went wrong (I'm sure you know that!).

20 Jan 2014, 10:53 PM
#17
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

avibodha:

It would really be good to see if error logging is working. Check your php.ini for error log location (or put phpinfo() into a page). Usually logs go to the cache folder so check there first. If not, maybe in apache logs, or system error log location.

You're really in the dark without error logs to tell you what went wrong (I'm sure you know that!).

Thanks for trying to help.. a few things...

I'm running ZC v1.5.1 so the error logs (if any) will go to the "logs" folder not the "cache" folder.. To be thorough I have already checked BOTH folders anyway.. I've also checked the server error logs..

When I stated that I have NO error logs, I really mean I have NO error logs anywhere.. Which is why I really have no CLUE what the cause of the issue is for this site.. No other client sites with similar configurations have this issue..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

20 Jan 2014, 11:22 PM
#18
avibodha avatar

avibodha

New Zenner

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

Re: After upgrade to PHP 5.4, site displays a blank page..

That's really strange to have no logs showing anything.

Try this, put this in any php file that runs:
error_log('testing error logs');

You could add it as an extra file in includes/extra_configures, or just add it to a template file somewhere. Check and make sure you can see this message in a log file. If not, something is misconfigured...first guess would be permissions on the cache or logs folders.

If you can log this, but nothing else shows up, you could try installing xdebug (xdebug.org) as a php plugin and see if that gives more information. Otherwise, put in error_log statements throughout the store index.php and change the text on each. See how many get logged to narrow down on where the problem is. But that's last resort.

You could also put phpinfo(); into a file to double-check that logging is turned also, and where the path is.

21 Jan 2014, 12:41 AM
#19
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade to PHP 5.4, site displays a blank page..

avibodha:

That's really strange to have no logs showing anything.

Try this, put this in any php file that runs:
error_log('testing error logs');

You could add it as an extra file in includes/extra_configures, or just add it to a template file somewhere. Check and make sure you can see this message in a log file. If not, something is misconfigured...first guess would be permissions on the cache or logs folders.

If you can log this, but nothing else shows up, you could try installing xdebug (xdebug.org) as a php plugin and see if that gives more information. Otherwise, put in error_log statements throughout the store index.php and change the text on each. See how many get logged to narrow down on where the problem is. But that's last resort.

You could also put phpinfo(); into a file to double-check that logging is turned also, and where the path is.

Other error logs show just fine (see my earlier response to Rod about what happens if I turn off the template and use the default template) so there isn't a permissions error for the error logs folders.. They worked just fine before.. permissions have not changed.. The ONLY change was the webhost's update to PHP 5.4..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

21 Jan 2014, 12:54 AM
#20
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: After upgrade to PHP 5.4, site displays a blank page..

DivaVocals:

Other error logs show just fine (see my earlier response to Rod about what happens if I turn off the template and use the default template) so there isn't a permissions error for the error logs folders.. They worked just fine before.. permissions have not changed.. The ONLY change was the webhost's update to PHP 5.4..

When the host allows the change from one PHP version to the other, does the contents of the php.ini file change say if using the "default"? (Of course backup before selecting something that would modify the php.ini file. When I upgraded from 5.2 to 5.3 I had to go through line by line to confirm that options shown were in fact still available and I reviewed the 5.3 "update" guide (somewhere) to confirm thati could still use whatever option in question.

Of course I had done things the hard way at the time, because I didn't just do what I suggested above (select a "default" php.ini for the version being used.) Really don't know if any of that would help, sorry for the "shot-in-the-dark" approach. :(

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