Ronnie Depp
Ronnie Depp

Reputation: 159

Any Solution for?? Fatal error: Uncaught Error: Class "HTTP_Header" not found in /talentbase.xxxxxxxxxxxx.com/classes/Kohana/Response.php on line 123?

<?php defined('SYSPATH') OR die('No direct script access.');
/**
 * Response wrapper. Created as the result of any [Request] execution
 * or utility method (i.e. Redirect). Implements standard HTTP
 * response format.
 *
 * @package    Kohana
 * @category   Base
 * @author     Kohana Team
 * @copyright  (c) 2008-2012 Kohana Team
 * @license    http://kohanaphp.com/license
 * @since      3.1.0
 */
 
class Kohana_Response implements HTTP_Response {

    /**
     * Factory method to create a new [Response]. Pass properties
     * in using an associative array.
     *
     *      // Create a new response
     *      $response = Response::factory();
     *
     *      // Create a new response with headers
     *      $response = Response::factory(array('status' => 200));
     *
     * @param   array    $config Setup the response object
     * @return  Response
     */
    public static function factory(array $config = array())
    {
        return new Response($config);
    }

    // HTTP status codes and messages
    public static $messages = array(
        // Informational 1xx
        100 => 'Continue',
        101 => 'Switching Protocols',

        // Success 2xx
        200 => 'OK',
        201 => 'Created',
        202 => 'Accepted',
        203 => 'Non-Authoritative Information',
        204 => 'No Content',
        205 => 'Reset Content',
        206 => 'Partial Content',

        // Redirection 3xx
        300 => 'Multiple Choices',
        301 => 'Moved Permanently',
        302 => 'Found', // 1.1
        303 => 'See Other',
        304 => 'Not Modified',
        305 => 'Use Proxy',
        // 306 is deprecated but reserved
        307 => 'Temporary Redirect',

        // Client Error 4xx
        400 => 'Bad Request',
        401 => 'Unauthorized',
        402 => 'Payment Required',
        403 => 'Forbidden',
        404 => 'Not Found',
        405 => 'Method Not Allowed',
        406 => 'Not Acceptable',
        407 => 'Proxy Authentication Required',
        408 => 'Request Timeout',
        409 => 'Conflict',
        410 => 'Gone',
        411 => 'Length Required',
        412 => 'Precondition Failed',
        413 => 'Request Entity Too Large',
        414 => 'Request-URI Too Long',
        415 => 'Unsupported Media Type',
        416 => 'Requested Range Not Satisfiable',
        417 => 'Expectation Failed',

        // Server Error 5xx
        500 => 'Internal Server Error',
        501 => 'Not Implemented',
        502 => 'Bad Gateway',
        503 => 'Service Unavailable',
        504 => 'Gateway Timeout',
        505 => 'HTTP Version Not Supported',
        509 => 'Bandwidth Limit Exceeded'
    );

    /**
     * @var  integer     The response http status
     */
    protected $_status = 200;

    /**
     * @var  HTTP_Header  Headers returned in the response
     */
    protected $_header;

    /**
     * @var  string      The response body
     */
    protected $_body = '';

    /**
     * @var  array       Cookies to be returned in the response
     */
    protected $_cookies = array();

    /**
     * @var  string      The response protocol
     */
    protected $_protocol;

    /**
     * Sets up the response object
     *
     * @param   array $config Setup the response object
     * @return  void
     */
    public function __construct(array $config = array())
    {
        $this->_header = new HTTP_Header;
        **...**

Why is this error is being shown as in this image below ??

 HTTP\Header class is not found or loaded

Please explain the reason. i got PHP 8.2 running on server. What could be the reason.

in my opinion it is unable to resolve the HTTP_Header to either \system\classes\Kohana\HTTP\Header.php class or ...\system\classes\HTTP\Header.php as both files are available at their location.

Do we have a solution for this issue ??

How can we resolve it ??

Upvotes: 0

Views: 45

Answers (0)

Related Questions