When I save a template that contains php tags it gives me the dreaded:
500 Internal Server Error
The request was not completed. The server met an unexpected condition.
the worst! That error is usually hard to get good info from.
If I save the template as a file using an editor and an FTP client the page loads fine and the php logic runs fine.
Digging in a bit…if either of these lines is in the template when I save the template it throws that 500 error:
$result = $this->EE->db->query("SELECT * FROM exp_sites WHERE site_id = 1");or
$result = $this->EE->db->query('SELECT s.*,
t.*
FROM exp_structure AS s
LEFT JOIN exp_channel_titles AS t ON s.entry_id = t.entry_id
LEFT JOIN exp_category_posts AS c ON s.entry_id = c.entry_id
WHERE s.dead NOT LIKE "root"
AND c.cat_id = 5
AND t.status = "open"
ORDER BY s.lft asc');Any ideas?