Title: wp-comments-post.php Error 500
Last modified: August 19, 2016

---

# wp-comments-post.php Error 500

 *  [priya-r](https://wordpress.org/support/users/priya-r/)
 * (@priya-r)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/wp-comments-postphp-error-500/)
 * I am using php-cgi lines in the files, this is a fresh install of 2.9.2 and so
   I am using the default theme and no plugins. When I am logged in as an admin 
   I can post the comments, but when someone else tries to comment, the error message
   displayed is 500. However, when I go back to the post and refresh I see that 
   the comment is posted. So I think it is the redirect(after commenting) to the
   post is not happening. What could be going wrong, please suggest. I have tried
   to empty DB(as it was a fresh install) and even tried to reinstall; but nothing
   helps.
 * Thanks.

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

 *  Thread Starter [priya-r](https://wordpress.org/support/users/priya-r/)
 * (@priya-r)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/wp-comments-postphp-error-500/#post-1473761)
 * Can someone help please??
 *  [sailboatvn](https://wordpress.org/support/users/sailboatvn/)
 * (@sailboatvn)
 * [16 years ago](https://wordpress.org/support/topic/wp-comments-postphp-error-500/#post-1473969)
 * We’re having the same issue.. sometime the admin-ajax.php also having 500 internal
   server error. Suspected that server’s configuration. I will do some more research/
   google and see if there is any solution for this.
 *  [sailboatvn](https://wordpress.org/support/users/sailboatvn/)
 * (@sailboatvn)
 * [16 years ago](https://wordpress.org/support/topic/wp-comments-postphp-error-500/#post-1473976)
 * Okay, I finally got to bottom of this issue. After a day of googling, tried many
   suggestions from various of blogs, forums without any luck. I have decided to
   debug it myself. Surprisingly, the problem came from wp-includes/class-phpmailer.
   php. Somehow, our server could not handle the php function send() properly. Besides,
   make sure always check if a class exists before including it.
 * E.g.
    `include_once($this->PluginDir . 'class-smtp.php');`
 * Need to change it to:
    `if (!class_exists("SMTP")) include_once($this->PluginDir.'
   class-smtp.php');`

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

The topic ‘wp-comments-post.php Error 500’ is closed to new replies.

## Tags

 * [error 500](https://wordpress.org/support/topic-tag/error-500/)
 * [wp-comments-post.php](https://wordpress.org/support/topic-tag/wp-comments-post-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [sailboatvn](https://wordpress.org/support/users/sailboatvn/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/wp-comments-postphp-error-500/#post-1473976)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
