0

I am used codegniter 1.7.1 older version for my real estate stie and it is working fine in local host xamp server.

But when i uploaded in to server, the site not working , showing error as "Fatal error: Cannot redeclare class Locale in /application/libraries/Locale.php on line 12"

pls help me how to solve this ..

thanks in advance..

3
Contributors
9
Replies
24
Views
4 Years
Discussion Span
Last Post by Walid_1
0

I think its here, in local_helper.php

        function __($text, $domain = 'default') {

        $CI =& get_instance();

        $CI->load->library('Locale1');

        return $CI->locale1->tr($text, $domain);

        }



        function _e($text, $domain = 'default') {

        echo __($text, $domain);

    }

And here is Locale.php

        class Locale1 {
        //initializing
        var $_data;
        var $locale;
        var $_l10n;
        var $table;
        var $codes;
        var $default;

        function Locale() {
            $this->table = ('languages');
            $this->obj =& get_instance();
            $this->codes = $this->get_codes();
            $this->default = $this->get_default();

            if (!$this->obj->session->userdata('lang')) {
                $this->obj->session->set_userdata('lang', $this->default);
            }

            log_message('debug', 'Locale Class Initialized');

        }
        .
        .
        .
        .

        etc
0

remove Internationalization extension if not needed and restart apapche it will work !

sudo apt-get remove php5-intl --purge
sudo service apache2 restart

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.