cphalcon: Uncaught Error: Access to undeclared static property: Phalcon\\Di::$_default
It works fine with PHP 5.6 but when I upgrade to PHP7 this error happens
Uncaught Error: Access to undeclared static property: Phalcon\Di:😒_default bootstrap_web.php.
[:error] [pid 28022:tid 140093905889024] [client xxx.xxx.xxx.xxx:53064] PHP Fatal error:
Uncaught Error: Access to undeclared static property:
Phalcon\\Di::$_default in /path/to/website/app/bootstrap_web.php:20
Stack trace:
#0 [internal function]: Phalcon\\Di->__construct()
#1 /path/to/website/app/bootstrap_web.php(20): Phalcon\\Di\\FactoryDefault->__construct()
#2 /path/to/website/public/index.php(18): require(/path/to/website/app/b...')
#3 {main}
Next Error: Access to undeclared static property: Phalcon\\Di::$_default in /path/to/website/app/bootstrap_web.php:20
Stack trace:
#0 [internal function]: Phalcon\\Di->__construct()
#1 /path/to/website/app/bootstrap_web.php(20): Phalcon\\Di\\FactoryDefault->__construct()
#2 /path/to/website/public/index.php(18): require('/path/to/website/app/b...')
#3 {main}
thrown in /path/to/website/app/bootstrap_web.php on line 20, referer: http://website.url
Details
- Phalcon version: 3.1.2
- PHP Version: PHP 7.0.15 (cli) (built: Feb 27 2017 23:58:56) (Zend Engine v3.0.0 ,with Zend OPcache v7.0.15,)
- Operating System: CentOS Linux release 7.3.1611 (Core)
- Installation type: Compiling from source
- Server: Apache and Compiling from source
- Other related info (Database, table schema): DB Mysql 5.7
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (7 by maintainers)
Im not blaming the OS, im blaming apache. The similar thing that in all those issues people use mod_php - i think somehow mod_php + phalcon is problem, maybe OS related too.
The best will be if someone can do some vagrantbox/docker to reproduce issue. Maybe @sjinks could then do some digging to figure this out.