Title: 500 Error for Posts and Post Comments
Last modified: August 19, 2016

---

# 500 Error for Posts and Post Comments

 *  Resolved [theluckychicken](https://wordpress.org/support/users/theluckychicken/)
 * (@theluckychicken)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/500-error-for-posts-and-post-comments/)
 * I’ve been working on my blog for a few weeks now, and I’ve just realised that
   blog **single posts** and **comment posts** are returning a 500 error in my browser.
   Permalinks are turned on with the value being `%postname%/`
 * I have read elsewhere and tried the following solutions I’ve found on this forum
   and others;
    – .htaccess to include mod_rewrite solution – modified httpd.conf
   to allow mod-re_write – wp_posts database changes to allow negative values
 * Website is [http://www.262oh.com.au](http://www.262oh.com.au) – (don’t be too
   critical, it’s still being developed). Any thoughts? I don’t susepct it’s a .
   htaccess problem, as other pages are working. It seems only to happen to single
   and comments pages.
 * Below is the code for single.php:
 *     ```
       <?php get_header(); ?>
        <div id="content">
          <?php
       	$blog = get_cat_id(get_option('rascals_blog'));
       	global $more;
       	$more = 0;
           if (have_posts()):
           ?>
           <?php while (have_posts()):
               the_post();?>
           <div class="entry">
             <div class="entry-top"> </div>
             <div class="entry-content">
               <h1><a href="<?php the_permalink();?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title();?></a></h1>
              <?php the_content('[ read more ]');?>
             </div>
             <!-- end entry-content -->
             <div class="entry-bottom"> </div>
             <?php if (in_category($blog)) : ?>
               <div class="post-meta-data">
                <p>Posted <?php the_time( 'M j, Y' ); ?> in <?php the_category( ', ' ); ?> </p> <a href="<?php the_permalink() ?>#comments" title="Comments" class="comments"><?php comments_number( '0','1','%' ); ?></a>
             </div>
             <? endif; ?>
           </div>
           <!-- end entry -->
           <?php endwhile;?>
           <?php else :?>
             <div class="entry">
             <div class="entry-top"> </div>
             <div class="entry-content">
               <h1>Error - 404</h1>
                <p>
                   Sorry the page you are looking for does not exist
               </p>
             </div>
             <!-- end entry-content -->
             <div class="entry-bottom"> </div>
           </div>
           <!-- end entry -->
           <?php endif;?>
            <!-- comments -->
            <?php if( 'open' == $post->comment_status ) comments_template(); ?>
           <!-- end comments -->
         </div>
         <!-- end content -->
         <div id="sidebar">
       		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Single Post Sidebar') ) : ?>
       		<?php endif; ?>
         </div>
         <!-- end sidebar -->
       </div>
       <!-- end wrapper -->
       <?php if (!in_category($blog)) {include(TEMPLATEPATH . '/footer.php');} else { include(TEMPLATEPATH . '/footer-blog.php');}; ?>
       </blockquote>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [theluckychicken](https://wordpress.org/support/users/theluckychicken/)
 * (@theluckychicken)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/500-error-for-posts-and-post-comments/#post-1287681)
 * The porblem is definaltely in the single.php or the data that the scripting calls.
 *  Thread Starter [theluckychicken](https://wordpress.org/support/users/theluckychicken/)
 * (@theluckychicken)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/500-error-for-posts-and-post-comments/#post-1287682)
 * Argh! Dame Short form PHP doesn’t work in my server.
 * Chaneged ? to ?PHP

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘500 Error for Posts and Post Comments’ is closed to new replies.

## Tags

 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [single.php](https://wordpress.org/support/topic-tag/single-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [theluckychicken](https://wordpress.org/support/users/theluckychicken/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/500-error-for-posts-and-post-comments/#post-1287682)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
