abilstein Posted January 26, 2003 Share Posted January 26, 2003 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 More sharing options...
Christian Lescuyer Posted January 28, 2003 Share Posted January 28, 2003 Check the register_globals setting in php.ini. It should be on for osCommerce. If you don't want to have it on for all your sites, set it in a .htaccess file. Christian Lescuyer Link to comment Share on other sites More sharing options...
lap Posted February 3, 2003 Share Posted February 3, 2003 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 More sharing options...
Christian Lescuyer Posted February 3, 2003 Share Posted February 3, 2003 It is not the problem. I already answered that in another thread. Try not to post all over the place. It's not easy to follow your progress if information is scattered in various threads. Christian Lescuyer Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.