Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.


Fatal error: Uncaught Error: Access to undeclared static property: Phalcon\Di::$_default in E:\datacentre\app\config\services.php:42 Stack trace:

0 [internal function]: Phalcon\Di->__construct()

1 E:\datacentre\app\config\services.php(42): Phalcon\Di\FactoryDefault->__construct()

2 E:\datacentre\public\index.php(52): require('E:\datacentre\a...')

3 {main}

Next Error: Access to undeclared static property: Phalcon\Di::$_default in E:\datacentre\app\config\services.php on line

8 use Phalcon\DI\FactoryDefault; ..... 42 $di = new FactoryDefault();

edited Sep '16

This is known problem with windows and apache2 php module only/iis + php module. You can solve it by using:

  • nginx + php-cgi + windows
  • apache + php-cgi + windows
  • iis + php-cgi + windows
  • docker to use linux
  • vagrant to use linux

Of course in future phalcon team will need to fix this issue.


nginx+php-fpm+linux(centos) can solve this?

As i posted above if you want to keep phalcon and windows nginx + php-cgi can work too.