Re: php 5.4 fatal error, query factory
I also started experiencing same problem after I migrated to Godaddy "Ultimate" shared hosting from another Godaddy hosting. I copied fixed version of "session.php" from github. But problem persist. FYI: My zen cart version is 1.51
Here is error message from Godaddy when I try to login. It stuck on below blank page.
/index.php?main_page=login&action=process
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
"
Here is Zen cart log.
[26-Nov-2013 01:24:40 UTC] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 693694233 bytes) in /home/xxxxx/public_html/includes/functions/html_output.php on line 62
"
Is there any other fix?
Quote:
Originally Posted by
DrByte
Re: php 5.4 fatal error, query factory
Since the code that was causing this problem in sessions.php was removed, you'll need to find where html_output.php is getting called.
You can either install the Xdebug module which will automatically log a stack trace on errors or you could try and put debug_backtrace() in the register_shutdown_function() that's in the new session.php. Post what you find.
Re: php 5.4 fatal error, query factory
I got the same "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1605959449 bytes) in /home2/zzzzz/public_html/includes/functions/html_output.php on line 77" error. I changed session.php as Dr. Byte pointed out. The error still exists.
This just happened when my host removed php 5.3 and forced us to use either php 5.4 or 5.2 two days ago. When I choose php 5.4, the customer login became blank after all the user name password stuff. In the log folder, I can find the above error log. However, if I switch to 5.2, the problem went away. It seems that this problem is php version related. I talked with my host and was told that they are going to pull away php 5.2 very soon. Therefore, we have to find a solution to this error before they do that. Please post your solution if you have solved this problem. Thank you!
Re: php 5.4 fatal error, query factory
Quote:
Originally Posted by
kagaroo
I got the same "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1605959449 bytes) in /home2/zzzzz/public_html/includes/functions/html_output.php on line 77" error. I changed session.php as Dr. Byte pointed out. The error still exists.
This just happened when my host removed php 5.3 and forced us to use either php 5.4 or 5.2 two days ago. When I choose php 5.4, the customer login became blank after all the user name password stuff. In the log folder, I can find the above error log. However, if I switch to 5.2, the problem went away. It seems that this problem is php version related. I talked with my host and was told that they are going to pull away php 5.2 very soon. Therefore, we have to find a solution to this error before they do that. Please post your solution if you have solved this problem. Thank you!
PHP 5.2 and 5.3 have reached end of life.
You may have some custom coding in your install which does not cope well with PHP > 5.2
Try and install a demo vanilla ZC 1.5.1 version on your server somewhere in a subdirectory, switch to PHP 5.4 and see what happens. I bet you won't have a problem with the demo install. But if you do, then that could be due to server configs.
Re: php 5.4 fatal error, query factory
Just fresh install zc 1.51 version on my server and test as frank18 suggested. Yes, no problem, I can log in without any problem.
For my site, it was originally for the zc 1.38 and recently upgraded to zc 1.51. It was running smoothly on php 5.2 or 5.3. but not on php5.4.
When switch to php5.4, there two files seems to have problem when customers try to log in.
includes/functions/html_output.php on line 77
includes/classes/seo.url.php on line 215
Both line has the same code nearby.
Code:
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (defined('SID') && zen_not_null(SID)) {
$sid = SID;
I have ultimate seo url module installed. But I still get the same error when I disable seo module.
Re: php 5.4 fatal error, query factory
Quote:
Originally Posted by
kagaroo
Just fresh install zc 1.51 version on my server and test as frank18 suggested. Yes, no problem, I can log in without any problem.
... as predicted :smile:
Quote:
Originally Posted by
kagaroo
For my site, it was originally for the zc 1.38 and recently upgraded to zc 1.51. It was running smoothly on php 5.2 or 5.3. but not on php5.4.
When switch to php5.4, there two files seems to have problem when customers try to log in.
includes/functions/html_output.php on line 77
includes/classes/seo.url.php on line 215
Both line has the same code nearby.
Code:
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (defined('SID') && zen_not_null(SID)) {
$sid = SID;
I have ultimate seo url module installed. But I still get the same error when I disable seo module.
I would now install ultimate seo on the new demo site and then test again if it works on PHP 5.4
If it does, then compare your live site to your demo site - you may be able to find the piece of code which causes you trouble with PHP 5.4
Re: php 5.4 fatal error, query factory
Read the previous messages, the sympton of my site is exactly like WayneStephens in the first page. If customers have some merchandise in the shopping cart, then there is no problem to login and the page will be directed to shopping cart page again. However, if customers try to login from the homepage without any merchandise in the shopping cart, then error will ocurr with a blank page and refreshing this blank page will direct the customer to the account page and not the page where they come from. It seems that the following statement in login page header_php.php is not processed correctly in php 5.4, at least in my site.
Code:
$origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
There is nothing to do with seo, at least from what I observed. Since disable seo, the same problem occurs
Re: php 5.4 fatal error, query factory
Quote:
Originally Posted by
kagaroo
... If customers have some merchandise in the shopping cart, then there is no problem to login and the page will be directed to shopping cart page again. However, if customers try to login from the homepage without any merchandise in the shopping cart, then error will ocurr with a blank page and refreshing this blank page will direct the customer to the account page and not the page where they come from. ...
I've been running Zen Cart 1.5.1 w/ USU for a few months on a hosted site running Apache2 / PHP 5.4.22 / MySQL 5.5.30. I also have test environments on Apache2 / PHP 5.4.4 / MySQL 5.5.31 and Apache2 / PHP 5.4.12 / MySQL 5.5.28 running Zen Cart 1.5.1 w/ USU... I have not yet applied the "sessions patch" to any of them...
Have not received any memory size exhausted messages yet... Tried the steps posted by lat9... Tried also making sure I was logged out, going to a product page (adds the snapshot), and finally a login (triggers that line of code). I am unable to duplicate the error on any of the above mentioned sites... :-(
Can you post the Web Server / PHP / MySQL versions on your hosting provider? Your settings for "configuration" -> "sessions" (I have all still at out of box settings - except the live site which has force cookies enabled)? The settings for PHP "sessions" (found in the Zen Cart Administrative interface under "version" for PHP)? Hosting Provider? Any caching being done by the hosting provider?
Hoping we might see a pattern for those still experiencing this issue...
Re: php 5.4 fatal error, query factory
Hi, Ihungil, thank you for your time. I was just frustrated after switched to php 5.4. Here is the info you asked:
MySQL 5.5.34
PHP Version: 5.4.20
HTTP Server: Apache
Server OS: Linux 2.6.32
Provider:Bluehost
session setting in php version (just master value)
session.auto_start Off
session.cache_expire 180
session.cache_limiter nocache
session.cookie_domain no value
session.cookie_httponly Off
session.cookie_lifetime 0
session.cookie_path /
session.cookie_secure Off
session.entropy_file /dev/urandom
session.entropy_length 0
session.gc_divisor 1000
session.gc_maxlifetime 1440
session.gc_probability 1
session.hash_bits_per_character 5
session.hash_function 1
session.name PHPSESSID
session.referer_check no value
session.save_handler files
session.save_path /tmp
session.serialize_handler php
session.upload_progress.cleanup On
session.upload_progress.enabled On
session.upload_progress.freq 1%
session.upload_progress.min_freq 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_
session.use_cookies On
session.use_only_cookies On
session.use_trans_sid 0
session setting in admin:
Session Directory /home2/zzzzz/public_html/cache
Cookie Domain True
Force Cookie Use False
Check SSL Session ID False
Check User Agent False
Check IP Address False
Prevent Spider Sessions True
Recreate Session True
IP to Host Conversion Status true
Use root path for cookie path False
Add period prefix to cookie domain True
Re: php 5.4 fatal error, query factory
Here's the configuration for the installation that was failing:
PHP: 5.4.21
MySQL: 5.1.72
Server OS: Linux 2.6.28.8-20120713a-iscsi-ntacker-3ware-sec8-fmon-igb-dif2-grsec
HTTP Server: Apache
Provider: 1and1
Code:
session
Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary wddx
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain .mystore.com no value
session.cookie_httponly On Off
session.cookie_lifetime 0 0
session.cookie_path /myadmin /
session.cookie_secure Off Off
session.entropy_file /dev/urandom /dev/urandom
session.entropy_length 32 32
session.gc_divisor 2 100
session.gc_maxlifetime 900 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name zenAdminID PHPSESSID
session.referer_check no value no value
session.save_handler user files
session.save_path /mystore/cache /tmp
session.serialize_handler php php
session.upload_progress.cleanup On On
session.upload_progress.enabled On On
session.upload_progress.freq 1% 1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_ upload_progress_
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 0 0
Code:
Session Directory /mystore/cache
Cookie Domain True
Force Cookie Use False
Check SSL Session ID False
Check User Agent False
Check IP Address False
Prevent Spider Sessions True
Recreate Session True
IP to Host Conversion Status true
Use root path for cookie path False
Add period prefix to cookie domain True