Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error after upgrading to PHP 4.3


abilstein

Recommended Posts

Users can no longer check out after our recent upgrade to PHP 4.3. We also upgraded Apache and MySQL although I suspect the error is related to PHP. On clicking checkout, users get:

 

Warning: feof(): supplied resource is not a valid stream resource in /home/virtual/site3/fst/var/www/html/store/includes/classes/http_client.php on line 385

 

Warning: fgets(): supplied resource is not a valid stream resource in /home/virtual/site3/fst/var/www/html/store/includes/classes/http_client.php on line 386

 

It's also stuck in a loop repeating those two errors. The related code is:

 

/**

* processHeader() reads header lines from socket until the line equals $lastLine

* @scope protected

* @return array of headers with header names as keys and header content as values

**/

   function processHeader($lastLine = "rn") {

     $headers = array();

     $finished = false;



     while ( (!$finished) && (!feof($this->socket)) ) {

       $str = fgets($this->socket, 1024);

       $finished = ($str == $lastLine);

       if (!$finished) {

         list($hdr, $value) = split(': ', $str, 2);

// nasty workaround broken multiple same headers (eg. Set-Cookie headers) @FIXME 

         if (isset($headers[$hdr])) {

           $headers[$hdr] .= '; ' . trim($value);

         } else {

           $headers[$hdr] = trim($value);

         }

       }

     }



     return $headers;

   }

 

The two lines in question are:

 

      while ( (!$finished) && (!feof($this->socket)) ) {

       $str = fgets($this->socket, 1024);

 

Any suggestions?

...Alex

Link to comment
Share on other sites

Do you think the the global registed is the matter ?

but when i check my host, we have had it ON already !!

check :arrow: www.basm.be/phpinfo

 

do think it is may be the extension_dir have not properly set, to able PHP to use the .dll files :!:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...