hey guys, i need a bit of help getting my shopping cart working. im using joomla and VirtueMart and when i go through the order process and click on the confirmation page.. i get the following error

Fatal error: Maximum execution time of 60 seconds exceeded in D:\Program Files\xampp\htdocs\administrator\components\com_virtuemart\classes\phpmailer\class.smtp.php on line 372

any ideas what to do?

    What's on line 372 of class.smtp.php?

      " }"
      and above that is

              # now send the lines to the server
              while(list(,$line_out) = @each($lines_out)) {
                  if(strlen($line_out) > 0)
                  {
                      if(substr($line_out, 0, 1) == ".") {
                          $line_out = "." . $line_out;
                      }
                  }
                  fputs($this->smtp_conn,$line_out . $this->CRLF);
              }

      I am using xampp btw

        What is in the smtp_conn? It is timing out because it is waiting for something, that code should not take that long to execute unless it's a million lines in the list.

        BTW is this on a winders platform?

          Probaly doesn't have a mailserver configured.

            im using windows... im using my isps mail server.

            Can some one tell me where the settings are located and what i should need to change?

              Well if it is winders then you won't have sendmail to send the email with so you had better check what this class is expecting to use to generate the email. Your isp's smtp server is just a relay server, it will not generate the email message for you. Read the php manual for the mail() function for more info on the differences between unix and winders when it comes to sending mail.

                umm so what do i do now? it should work in windows tho...

                the file i downloaded was for windows...

                  now i get the following errors

                  Warning: socket_get_status(): supplied argument is not a valid stream resource in D:\Program Files\xampp\htdocs\administrator\components\com_virtuemart\classes\phpmailer\class.smtp.php on line 226

                  Warning: fputs(): supplied argument is not a valid stream resource in D:\Program Files\xampp\htdocs\administrator\components\com_virtuemart\classes\phpmailer\class.smtp.php on line 602

                  help plz 🙂

                    You need to post the code from class.smtp.php line 226 and line 602.

                    the file i downloaded was for windows...

                    What file did you download and from where?

                      the file i got was for VirtueMart.. they dont have a clue whats wrong....

                          function Connected() {
                              if(!empty($this->smtp_conn)) {
                                  $sock_status = socket_get_status($this->smtp_conn);
                                  if($sock_status["eof"]) {
                                      # hmm this is an odd situation... the socket is
                                      # valid but we aren't connected anymore
                                      if($this->do_debug >= 1) {
                                          echo "SMTP -> NOTICE:" . $this->CRLF .
                                               "EOF caught while checking if connected";
                                      }
                                      $this->Close();
                                      return false;
                                  }
                                  return true; # everything looks good
                              }
                              return false;
                          }
                      
                      function Close() {
                          $this->error = null; # so there is no confusion
                          $this->helo_rply = null;
                          if(!empty($this->smtp_conn)) {
                              # close the connection and cleanup
                              fclose($this->smtp_conn);
                              $this->smtp_conn = 0;
                          }
                      }
                      
                      
                      
                      function Data($msg_data) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                              $this->error = array(
                                      "error" => "Called Data() without being connected");
                              return false;
                          }
                      
                          fputs($this->smtp_conn,"DATA" . $this->CRLF);
                      
                          $rply = $this->get_lines();
                          $code = substr($rply,0,3);
                      
                          if($this->do_debug >= 2) {
                              echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
                          }
                      
                          if($code != 354) {
                              $this->error =
                                  array("error" => "DATA command not accepted from server",
                                        "smtp_code" => $code,
                                        "smtp_msg" => substr($rply,4));
                              if($this->do_debug >= 1) {
                                  echo "SMTP -> ERROR: " . $this->error["error"] .
                                           ": " . $rply . $this->CRLF;
                              }
                              return false;
                          }
                      
                      
                          $msg_data = str_replace("\r\n","\n",$msg_data);
                          $msg_data = str_replace("\r","\n",$msg_data);
                          $lines = explode("\n",$msg_data);
                      
                      
                          $field = substr($lines[0],0,strpos($lines[0],":"));
                          $in_headers = false;
                          if(!empty($field) && !strstr($field," ")) {
                              $in_headers = true;
                          }
                      
                          $max_line_length = 998; # used below; set here for ease in change
                      
                          while(list(,$line) = @each($lines)) {
                              $lines_out = null;
                              if($line == "" && $in_headers) {
                                  $in_headers = false;
                              }
                              # ok we need to break this line up into several
                              # smaller lines
                              while(strlen($line) > $max_line_length) {
                                  $pos = strrpos(substr($line,0,$max_line_length)," ");
                                  $lines_out[] = substr($line,0,$pos);
                                  $line = substr($line,$pos + 1);
                      
                                  if($in_headers) {
                                      $line = "\t" . $line;
                                  }
                              }
                              $lines_out[] = $line;
                      
                      
                              while(list(,$line_out) = @each($lines_out)) {
                                  if(strlen($line_out) > 0)
                                  {
                                      if(substr($line_out, 0, 1) == ".") {
                                          $line_out = "." . $line_out;
                                      }
                                  }
                                  fputs($this->smtp_conn,$line_out . $this->CRLF);
                              }
                          }
                      
                      
                          fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
                      
                          $rply = $this->get_lines();
                          $code = substr($rply,0,3);
                      
                          if($this->do_debug >= 2) {
                              echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
                          }
                      
                          if($code != 250) {
                              $this->error =
                                  array("error" => "DATA not accepted from server",
                                        "smtp_code" => $code,
                                        "smtp_msg" => substr($rply,4));
                              if($this->do_debug >= 1) {
                                  echo "SMTP -> ERROR: " . $this->error["error"] .
                                           ": " . $rply . $this->CRLF;
                              }
                              return false;
                          }
                          return true;
                      }
                      
                      
                      function Expand($name) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                              $this->error = array(
                                      "error" => "Called Expand() without being connected");
                              return false;
                          }
                      
                          fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
                      
                          $rply = $this->get_lines();
                          $code = substr($rply,0,3);
                      
                          if($this->do_debug >= 2) {
                              echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
                          }
                      
                          if($code != 250) {
                              $this->error =
                                  array("error" => "EXPN not accepted from server",
                                        "smtp_code" => $code,
                                        "smtp_msg" => substr($rply,4));
                              if($this->do_debug >= 1) {
                                  echo "SMTP -> ERROR: " . $this->error["error"] .
                                           ": " . $rply . $this->CRLF;
                              }
                              return false;
                          }
                      
                          # parse the reply and place in our array to return to user
                          $entries = explode($this->CRLF,$rply);
                          while(list(,$l) = @each($entries)) {
                              $list[] = substr($l,4);
                          }
                      
                          return $list;
                      }
                      
                      
                      function Hello($host="") {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                              $this->error = array(
                                      "error" => "Called Hello() without being connected");
                              return false;
                          }
                      
                          # if a hostname for the HELO wasn't specified determine
                          # a suitable one to send
                          if(empty($host)) {
                              # we need to determine some sort of appopiate default
                              # to send to the server
                              $host = "localhost";
                          }
                      
                          // Send extended hello first (RFC 2821)
                          if(!$this->SendHello("EHLO", $host))
                          {
                              if(!$this->SendHello("HELO", $host))
                                  return false;
                          }
                      
                          return true;
                      }
                      
                      function SendHello($hello, $host) {
                          fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
                      
                          $rply = $this->get_lines();
                          $code = substr($rply,0,3);
                      
                          if($this->do_debug >= 2) {
                              echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
                          }
                      
                          if($code != 250) {
                              $this->error =
                                  array("error" => $hello . " not accepted from server",
                                        "smtp_code" => $code,
                                        "smtp_msg" => substr($rply,4));
                              if($this->do_debug >= 1) {
                                  echo "SMTP -> ERROR: " . $this->error["error"] .
                                           ": " . $rply . $this->CRLF;
                              }
                              return false;
                          }
                      
                          $this->helo_rply = $rply;
                      
                          return true;
                      }
                      
                      
                      function Help($keyword="") {
                          $this->error = null; # to avoid confusion
                      
                          if(!$this->connected()) {
                              $this->error = array(
                                      "error" => "Called Help() without being connected");
                              return false;
                          }
                      
                          $extra = "";
                          if(!empty($keyword)) {
                              $extra = " " . $keyword;
                          }
                      
                          fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);
                      
                          $rply = $this->get_lines();
                          $code = substr($rply,0,3);
                      
                          if($this->do_debug >= 2) {
                              echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
                          }
                      
                          if($code != 211 && $code != 214) {
                              $this->error =
                                  array("error" => "HELP not accepted from server",
                                        "smtp_code" => $code,
                                        "smtp_msg" => substr($rply,4));
                              if($this->do_debug >= 1) {
                                  echo "SMTP -> ERROR: " . $this->error["error"] .
                                           ": " . $rply . $this->CRLF;
                              }
                              return false;
                          }
                      
                          return $rply;
                      }
                      
                      
                      function Mail($from) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                              $this->error = array(
                                      "error" => "Called Mail() without being connected");
                              return false;
                          }
                      
                          fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF);
                      
                          $rply = $this->get_lines();
                          $code = substr($rply,0,3);
                      
                          if($this->do_debug >= 2) {
                              echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
                          }
                      
                          if($code != 250) {
                              $this->error =
                                  array("error" => "MAIL not accepted from server",
                                        "smtp_code" => $code,
                                        "smtp_msg" => substr($rply,4));
                              if($this->do_debug >= 1) {
                                  echo "SMTP -> ERROR: " . $this->error["error"] .
                                           ": " . $rply . $this->CRLF;
                              }
                              return false;
                          }
                          return true;
                      }

                        bump any ideas? should i be able to use my isps mail server or do i have to install one...

                          when i put the wrong host in, it says it cannot connect and shows a few errors.

                          when i put the right host in, it times out?? any ideas?!

                            well now it goes to a confirmation page with the following errors

                            Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.iinet.net.au:587 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in D:\Program Files\xampp\htdocs\administrator\components\com_virtuemart\classes\phpmailer\class.smtp.php on line 122

                            Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.iinet.net.au:587 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in D:\Program Files\xampp\htdocs\administrator\components\com_virtuemart\classes\phpmailer\class.smtp.php on line 122

                            still do not get an email

                              Write a Reply...