Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Warning! Fuel\Core\PhpErrorException [ Warning ]:
  • Warning!
    Fuel\Core\PhpErrorException [ Warning ]:
    get_browser() [function.get-browser]: Delimiter must not be alphanumeric or backslash

    COREPATH/classes/agent.php @ line 196
     // do we have a user agent?
            if (static::$user_agent)
            {
                // try the build in get_browser() method
          196      if (ini_get('browscap') == '' or false === $browser = get_browser(null, true))
                 {
                     // if it fails, emulate get_browser()
                    $browser = static::get_from_browscap();
                }
    Here my controller
      $data['names'] =DB::select('shops.id as "shopid"','files.filepath','shops.name as "shopname"','prefectures.name as "prefecturename"','shops.prefecture_id','average_rate')->from('shops')
                            ->join('prefectures')->on('prefectures.id','=','shops.prefecture_id')->join('files')->on('files.id','=','shops.file_id')
                            ->where('national_pickup_flag','=','0')->and_where('delete_flag','=','0')->limit(2)
                            ->as_object()->execute()->as_array();
            
            $data['filepath'] = DB::select('shops.name as "shopname"','prefectures.name as "prefecturename"','shops.prefecture_id','files.filepath','average_rate')->from('shops')
                            ->join('prefectures')->on('prefectures.id','=','shops.prefecture_id')->join('files')->on('files.id','=','shops.file_id')
                            ->where('delete_flag','=', '0')->order_by('average_rate','desc')->limit(5)
                            ->as_object()->execute()->as_array();
            
            $data['rate'] = DB::select('shops.id as "shopid"','shops.name as "shopname"','prefectures.name as "prefecturename"','shops.prefecture_id','files.filepath','shops.id','rate.shop_id','rate.title','rate.comment','average_rate')->from('rate')
                            ->join('shops','INNER')->on('shops.id','=','rate.shop_id')
                            ->join('prefectures')->on('prefectures.id','=','shops.prefecture_id')->join('files')->on('files.id','=','shops.file_id')
                            ->where('rate.delete_flag','=', '0')->order_by('updated_at')->limit(5)
                            ->as_object()->execute()->as_array();
            
            $data['shop']   = DB::select('shops.id as "shopid"','shops.name as "shopname"','prefectures.name as "prefecturename"','shops.event','average_rate')->from('shops')
                            ->join('prefectures')->on('prefectures.id','=','shops.prefecture_id')
                            ->where('delete_flag', '=', '0')->order_by(DB::expr('RAND()'))->limit(7)
                            ->as_object()->execute()->as_array();
    if (Agent::is_mobiledevice())
    {
    //smartphone view
    } else
    {
    //standard view
    $this->template->leftcontent =View::forge('top/index');        
    $this->template->records = $right['records'];
                $this->template->new=$right['new'];
    $this->template->leftcontent->names=$data['names'];
    $this->template->leftcontent->filepath=$data['filepath'];
    $this->template->leftcontent->rate=$data['rate'];
                $this->template->url=$right['url'];
    $this->template->leftcontent->shops=$data['shop'];
    }
  • kenjiskenjis
    Accepted Answer
    Your browscap file must be broken.
    I found it in XAMPP for Windows is broken.

    Comment out browscap in php.ini.

    ~~~
     [browscap]
     ; http://php.net/browscap
    -browscap="C:\xampp\php\extras\browscap.ini"
    +;browscap="C:\xampp\php\extras\browscap.ini"
    ~~~

    So Fuel downloads the latest browscap file and cache it.

  • HarroHarro
    Accepted Answer
    Looks like you have a browscap.ini file on your server, configured in your php.ini file, that is not valid.

    get_browser() is a PHP function: http://php.net/manual/en/function.get-browser.php

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion