0

Good day, to start with, i am not the one who developed this Yii project(web app used for HR and inventory) in our Ubuntu server but our old I.T. 2 years ago, and it's so happen that right now me as the NEW IT that my boss decided to give up this application since we now have the SAP Business One(w/c we acquired just last late of 2015) so i decided to try to transfer(COPY AND PASTED with the DB) the project on my PC(win 7) and with the help of wampserver i will still be able to let our employees access it for item history purposes. The project composes of 53 folders, yes 53 separated folders and i saw that they are somehow dependent with each other.

The Error Says:

Fatal error: Class 'BrowserControlFilter' not found in C:\wamp\www\Khowai\Mackun_Leipzig\protected\controllers\SiteController.php on line 35

line 35:
    public function filterBrowserControl($filterChain)
    {
        $filter=new BrowserControlFilter;
        $filter->setRules($this->browserRules());
        $filter->filter($filterChain);
    }

project folder structure

www>
  >Khowai
     >Jeddah
        >controllers
           >BrowserControlFilter.php
     >Mackun_Leipzig
        >protected
           >controllers
              >SiteController.php

wha i have tried was requiring the BrowserControlFilter at the Mackun_Leipzig config/main.php

but there was another error:

Strict standards: Declaration of BrowserControlFilter::accessDenied() should be compatible with CAccessControlFilter::accessDenied($user, $message) in C:\wamp\www\Khowai\Jeddah\controllers\BrowserControlFilter.php on line 5

where the line 5 is:

class BrowserControlFilter extends CAccessControlFilter{
    protected function accessDenied($user)
    {
        throw new Exception(Yii::app()->params['labels']['english']['jeddah_Com_150']);
    }
}

i need help/answers like why this error happens when this app is fully functional at our Ubuntu server right now, but when i copy and pasted it to my windows pc, this errors are coming out.

aintno12u
  • 341
  • 4
  • 23
  • Make sure to use same php, apache and db version on your win and ubuntu before any code modification. Your initial goal should be to work with the app on win with no code changes – Alejandro Quiroz Dec 16 '16 at 04:41
  • I checked the following: Mysql - 5.1.49, Php 5.3.3 Apache 2.2.16. Ubuntu is 10.10. And here in my windows 7 pc i am using wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b – aintno12u Dec 19 '16 at 04:02

1 Answers1

0

Yes this is something typical for all languages when you try to lower the visibility. At east you have got it finding the class. See the beginning of the message: Strict standards:. This means that you run in strict standards mode or something similar. I suggest making the visibility the same as in CAccessControlFilter, probably it is less than protected. This is the issue. For removing all those errors check those, it might help:

http://php.net/manual/en/function.error-reporting.php

PHP 5 disable strict standards error

Disabling Strict Standards in PHP 5.4

Community
  • 1
  • 1