controller methods are not visible to yii2

If i add a new action method in a controller, yii can’t ‘see’ it.

for example, if i place in the controller for view openAccess.php located in the view’s site folder-

public function actionPublicAccess()

{


    return $this->render('openAccess');


}

if i then place the below url in the browser

http://localhost/pathToWebRoot/web/index.php/site/PublicAccess

i get these errors:

2017-06-18 20:17:53 [127.0.0.1][-][f0238tg6ejclaupt4vrnlru6u4][trace][yii\web\Application::handleRequest] Route requested: ‘site/PublicAccess’

2017-06-18 20:17:53 [127.0.0.1][-][f0238tg6ejclaupt4vrnlru6u4][trace][yii\base\Controller::runAction] Route to run: site/error

the same path works fine if i just replace publicAccess with about, login or contact- so the basic syntax is fine.

just started to use yii2 so perhaps doing something wrong that is really basic.

thanks

http://www.yiiframework.com/doc-2.0/guide-structure-controllers.html#controller-class-naming

http://www.yiiframework.com/doc-2.0/guide-structure-controllers.html#creating-actions

If you successful got the about page actionAbout()

http://localhost/pathToWebRoot/web/index.php/site/about

you already have an hint on whats is wrong

Action name are CamelCase which are converted to all lowercase separated by ‘-’ --> camel-case

So in for your action actionPublicAccess() try

http://localhost/pathToWebRoot/web/index.php/site/public-access