cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[BUG]: Error: Class "Phalcon\'Mvc\View" not found in Base.php:118

Open count0nsk opened this issue 1 year ago • 3 comments

Hello, I newbie in Phalcon. Try to create the app, but have this problem (in title).

Base.php file:

use Phalcon\Di\FactoryDefault;
use Phalcon\Mvc\View;
use Phalcon\Mvc\View\Engine\Volt as VoltEngine;

...

public function __create()
    {
        $volt_functions = $this->volt_functions;
        $appcfg = new AppConfig();
        $this->view = new View();
//crash here
...

Expected behavior All work.

Details

  • Phalcon version: 5.0.2
  • PHP Version: 8.1.31
  • Operating System: Fedora 37
  • Installation type: installing via package manager
  • Zephir version (if any): no
  • Server: lighttpd 1.4.74

count0nsk avatar Feb 23 '25 20:02 count0nsk

On your server, or wherever you have this, create a simple PHP file called test.php and add this:

<?php

error_reporting(E_ALL);
ini_set('display_errors', 'On');

echo (new Phalcon\Support\Version())->get();

Then run it and see what it reports

php test.php

By the looks of it, Phalcon is not installed or enabled.

niden avatar Feb 24 '25 00:02 niden

Then run it and see what it reports

php pha.php
5.0.2

count0nsk avatar Feb 24 '25 04:02 count0nsk

Can you include the web server error_log for that specific crash? It doesn't make sense to have everything crash by just instantiating a class.

raicabogdan avatar Feb 27 '25 20:02 raicabogdan