Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress php function get_header and get_footer issue on IIS7.5 & localhost
    primarykey
    data
    text
    <p>I have installed IIS7.5 on my box for development including php of course, and i have copied my wordpress site from my live server and changed the url settings in the db etc.</p> <p>however when visiting the homepage none of the style or meta data associated in the header.php file is rendered. looking at the source code it changes the default php function</p> <pre><code> &lt;?php get_header(); ?&gt; </code></pre> <p>to include the header.php file and it gets rendered to the browser as </p> <pre><code> &lt;? get_header(); ?&gt; </code></pre> <p>i.e it is viewable as such in the view source.</p> <p>other php functions and includes and php generally seems to be running ok in other files... i have mantisBT install running smoothly for example.</p> <ul> <li>i have already tried copying the files from the server again and then using a fresh install of wordpress too.</li> <li>accessing the wp-admin all seems to work ok</li> </ul> <p>Does anyone have any ideas what might be causing this?</p> <p>ta</p> <p>EDIT: adding index.php file - very vanilla.</p> <pre><code> &lt;?php get_header(); ?&gt; &lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt; &lt;!-- Begin Post: &lt;?php the_title(); ?&gt; --&gt; &lt;div class="post"&gt; &lt;h3 class="posttitle"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt; &lt;div class="title"&gt;&lt;div class="postmetadata"&gt;&lt;?php the_time('F jS, Y'); ?&gt; by &lt;?php the_author(); ?&gt; in &lt;?php the_category(', '); ?&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="entry"&gt; &lt;?php the_content(); ?&gt; &lt;/div&gt; &lt;div class="tags"&gt;&lt;div class="postmetadata"&gt;&lt;?php the_tags('Tags: ', ', ', '&lt;br /&gt;'); ?&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="comments"&gt;&lt;div class="postmetadata"&gt;&lt;?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?&gt; &lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/comment.png" alt="Comments" /&gt;&lt;/div&gt;&lt;/div&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;!-- End Post: &lt;?php the_title(); ?&gt; --&gt; &lt;?php endwhile; ?&gt; &lt;div class="navigation"&gt; &lt;div class="alignleft"&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt; &lt;div class="alignright"&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt; &lt;/div&gt; &lt;?php else: ?&gt; &lt;p&gt;Sorry, no posts matched your criteria.&lt;/p&gt; &lt;?php endif; ?&gt; &lt;/div&gt; &lt;!-- Include Sidebars --&gt; &lt;?php include (TEMPLATEPATH . '/sidebarR.php'); ?&gt; &lt;?php include (TEMPLATEPATH . '/sidebarL.php'); ?&gt; &lt;/div&gt; &lt;?php get_footer(); ?&gt; </code></pre> <p>EDIT: added header.php - also pretty vanilla</p> <pre><code> &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="&lt;?php bloginfo('html_type'); ?&gt;; charset=&lt;?php bloginfo('charset'); ?&gt;" /&gt; &lt;link href="style.css" rel="stylesheet" type="text/css"/&gt; &lt;link rel="alternate" type="application/rss+xml" title="&lt;?php bloginfo('name'); ?&gt; RSS Feed" href="&lt;?php bloginfo('rss2_url'); ?&gt;" /&gt; &lt;link rel="pingback" href="&lt;?php bloginfo('pingback_url'); ?&gt;" /&gt; &lt;?php wp_head(); ?&gt; &lt;title&gt;&lt;?php if (is_single() || is_page() || is_archive()) { ?&gt;&lt;?php wp_title('',true); ?&gt; | &lt;?php } ?&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="navwrap"&gt; &lt;div id="nav"&gt; &lt;div class="navpad"&gt; &lt;ul class="navi"&gt; &lt;li class="page_item"&gt;&lt;/li&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="header"&gt; &lt;div class="headpad"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="wrapper"&gt; &lt;div id="content"&gt; </code></pre> <p>UPDATE: still getting the same issue, have reinstalled php 5.3.8, checked encoding, saved files as utf-8 without BOM. still no joy.</p> <pre><code> &lt;? get_header(); ?&gt; &lt;div class="post"&gt; </code></pre> <p>UPDATE 2:</p> <p>Still not got this to work, the code is standard for a wordpress theme, i've installed another theme and it seems to work ok, so i doubt it is a IIS7 issue.</p> <p>i've looked at the encoding of files and made sure everything is utf-8.</p> <p>all my wordpress core files are intact and up to date.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload