Okay this one is totally nuts, I've spent all day trying to nail this one.
I've attempting to go from EE 2.5.5 to 2.7.2, but after the upgrade, I'm getting the following error on some pages:
Error Number: 1054
Unknown column 't.dst_enabled' in 'field list'
SELECT t.entry_id, t.channel_id, t.forum_topic_id, t.author_id, t.ip_address, t.title, t.url_title, t.status, t.dst_enabled, t.view_count_one, t.view_count_two, t.view_count_three, t.view_count_four, t.allow_comments, t.comment_expiration_date, t.sticky, t.entry_date, t.year, t.month, t.day, t.edit_date, t.expiration_date, t.recent_comment_date, t.comment_total, t.site_id as entry_site_id, w.channel_title, w.channel_name, w.channel_url, w.comment_url, w.comment_moderate, w.channel_html_formatting, w.channel_allow_img_urls, w.channel_auto_link_urls, w.comment_system_enabled, m.username, m.email, m.url, m.screen_name, m.location, m.occupation, m.interests, m.aol_im, m.yahoo_im, m.msn_im, m.icq, m.signature, m.sig_img_filename, m.sig_img_width, m.sig_img_height, m.avatar_filename, m.avatar_width, m.avatar_height, m.photo_filename, m.photo_width, m.photo_height, m.group_id, m.member_id, m.bday_d, m.bday_m, m.bday_y, m.bio, md.*, wd.* FROM exp_channel_titles AS t LEFT JOIN exp_channels AS w ON t.channel_id = w.channel_id LEFT JOIN exp_channel_data AS wd ON t.entry_id = wd.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id LEFT JOIN exp_member_data AS md ON md.member_id = m.member_id WHERE t.entry_id IN (27) ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc
Filename: modules/channel/mod.channel.php
Line Number: 297
I thought it was a simple issue of an addon not being updated as dst_enabled has been removed since 2.6.
Now it get's weird.
I only get this error if I access the pages with a channel tag over SSL.
I've cut everything back to absolute bare bones, all addons, extensions, plugins and field types have been uninstalled and physically removed from the site. I've created a very basic template to reproduce the error:
{exp:channel:entries channel="pages" entry_id="27" limit="1" disable="categories|pagination|member_data|custom_fields|category_fields"}
<h1>{title}</h1>
{/exp:channel:entries}
I've also replaced all EE files with a fresh download in case a file was not replaced during the upgrade.
I've disabled htaccess, and reverted to stock EE config.
Running on PHP 5.4.19 and can reproduce it on different servers with entirely different configurations.
The really annoying thing is I've run into this issue before, took days to track it down but I didn't document the fix! Paying the price now :(