Error on Include php:/usr/share/pear

Would it not make more sense to use get_template_part() ? What may be happening is that there is no 404 template:

if ( '' != get_query_template( '404' ) )
   include( get_query_template( '404' ) );

http://codex.wordpress.org/Function_Reference/get_query_template

This may be because pretty permalinks have been turned off, or because there is no 404 page template to be found.

The same is true of your get_page_template:

  • You called query_posts but you did not call wp_Reset_query afterwards
  • get_page_template must be called within the post loop, yet there is no post loop to be found
  • you have the ID, it would be far easier to do a get_post_meta($ft_wpecards_parentpost,'_wp_page_template',true); to grab the page template filename, prefixed with the theme folder url