Ready to get started?Download WordPress


[warn] mod_fcgid: stderr: PHP Warning: feof() expects parameter 1 to be resource (2 posts)

  1. exius
    Posted 1 year ago #

    My apache error log blew up to 3 GB in 5 days because of this error kept recurring every second.

    Full string reads:

    [warn] mod_fcgid: stderr: PHP Warning: feof() expects parameter 1 to be resource, integer given in /home/site1/public_html/wp-includes/class-smtp.php on line 800

    Line 800 in .../wp-includes/class-smtp.php reads:

    while(!feof($this->smtp_conn)) {


       * Read in as many lines as possible
       * either before eof or socket timeout occurs on the operation.
       * With SMTP we can tell if we have more lines to read if the
       * 4th character is '-' symbol. If it is a space then we don't
       * need to read anything else.
       * @access private
       * @return string
      private function get_lines() {
        $data = "";
        while(!feof($this->smtp_conn)) {
          $str = @fgets($this->smtp_conn,515);
          if($this->do_debug >= 4) {
            echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
            echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
          $data .= $str;
          if($this->do_debug >= 4) {
            echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />';
          // if 4th character is a space, we are done reading, break the loop
          if(substr($str,3,1) == " ") { break; }
        return $data;

    WP SMTP was the only smtp plugin I was using. Can this bug be fixed?


  2. tomslick
    Posted 11 months ago #

    I started seeing the same issue starting yesterday. Mine seems to be attached to a Lost Password request.

    Did you figure out what was wrong?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.