Skip to content

php public/index.php returns base path error #27

@adarshkhatri

Description

@adarshkhatri

Bug Report

Summary

When I run php public/index.php it returns this error:

Uncaught Laminas\View\Exception\RuntimeException: No base path provided in vendor\laminas\laminas-view\src\Helper\BasePath.php:37

However, running php public/index.php development enable does work.

I have updated laminas-view and laminas-cache to the latest version but no help.

Is this normal behavior?

Current behavior

Throws error. Uncaught Laminas\View\Exception\RuntimeException: No base path provided in vendor\laminas\laminas-view\src\Helper\BasePath.php:37

api-tools-skeleton>php public/index.php

Fatal error: Uncaught Laminas\View\Exception\RuntimeException: No base path provided in api-tools-skeleton\vendor\laminas\laminas-view\src\Helper\BasePath.php:37
Stack trace:
#0 [internal function]: Laminas\View\Helper\BasePath->__invoke('/img/favicon.pn...')
#1 api-tools-skeleton\vendor\laminas\laminas-view\src\Renderer\PhpRenderer.php(396): call_user_func_array(Object(Laminas\View\Helper\BasePath), Array)
#2 api-tools-skeleton\module\Application\view\layout\layout.phtml(10): Laminas\View\Renderer\PhpRenderer->__call('basePath', Array)
#3 api-tools-skeleton\vendor\laminas\laminas-view\src\Renderer\PhpRenderer.php(505): include('C:\\wamp64\\www\\a...')
#4 api-tools-skeleton\vendor\laminas\laminas-view\src\View.php(206): Laminas\View\Renderer\PhpRenderer->render(NULL)
#5 api-tools-skeleton\vendor\laminas\laminas-mvc\src\View\Http\DefaultRenderingStrategy.php(104): Laminas\View\View->render(Object(Laminas\View\Model\ViewModel))
#6 C:\wamp64\ in api-tools-skeleton\vendor\laminas\laminas-view\src\Helper\BasePath.php on line 37

How to reproduce

Run php public/index.php

Expected behavior

Show the command line tools.

I have double confirmed by creating a fresh skeleton project

laminas-api-tools/api-tools#82 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions