Ajeh:
There is also a change that helps on php 5 for the two session.php functions ...
(code)
Note: do those session function files first or you won't get real far if already in php 5 ... :smile:
Quite - it looks like I already made this change a year and a half ago to the main sessions.php file. I don't actually remember doing it, hehe. Dreamhost must've force-switched to PHP5 a long while back, but maybe forcing MySQL 5 is only recent? Today I put this fix in the admin sessions file too, though it would appear that it was working on PHP5 without it for quite some time.
Ajeh:
Some of these threads can help:
http://www.zen-cart.com/forum/showthread.php?t=37460&highlight=join+upgrade
http://www.zen-cart.com/forum/showthread.php?t=25174
I'll start reading through then, thanks. This is kind of a hard problem to search for; I tried a couple different terms and read through a lot of threads already, hehe.
Ajeh:
Also get the Debug Tool from the Free Software Add Ons ... as it can help identify them ...
I forgot to mention that I had already done this last night as well - in both the admin and general sections. No log files were showing up (and I did make sure the cache folder was set to 777).
Checking it now, though, there are some log files present, all with the same error:
[19-Mar-2009 01:43:43] PHP Fatal error: Call to a member function Execute() on a non-object in /xxxx/xxxx/xxxx/xxxx/includes/functions/sessions.php on line 72
And this is the entire relevant function how it looks now, with line numbers (starting at 1; I notice line 72 is blank, so perhaps the line numbers should start at 0?):
**xxxx/includes/functions/sessions.php**
61 function _sess_write($key, $val) {
62
63 global $db;
64 // The following is only to work around a PHP 5.2.0 bug:
65 if (!is_object($db)) {
66 $db = new queryFactory();
67 $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
68 }
69 //PHP 5.2.0 bug workaround ...
70
71 global $SESS_LIFE;
72
73 $expiry = time() + $SESS_LIFE;
74 $value = $val;
75
76 $qid = "select count(*) as total
77 from " . TABLE_SESSIONS . "
78 where sesskey = '" . zen_db_input($key) . "'";
79
80 $total = $db->Execute($qid);
81
82 if ($total->fields['total'] > 0) {
83 $sql = "update " . TABLE_SESSIONS . "
84 set expiry = '" . zen_db_input($expiry) . "', value = '" . zen_db_input($value) . "'
85 where sesskey = '" . zen_db_input($key) . "'";
86
87 return $db->Execute($sql);
88
89 } else {
90 $sql = "insert into " . TABLE_SESSIONS . "
91 values ('" . zen_db_input($key) . "', '" . zen_db_input($expiry) . "', '" .
92 zen_db_input($value) . "')";
93
94 return $db->Execute($sql);
95
96 }
97 }
Perhaps I implemented the fix incorrectly? It's been somehow working for most of the last year and a half this way, though ;P