I
I
Igor Karachentsev2018-03-20 09:31:30
PHP
Igor Karachentsev, 2018-03-20 09:31:30

How to solve autoload problem in yii1?

There is a project on yii1. It was decided to update the php version to 7.0 and move to nginx + php-fpm. No sooner said than done. I picked it all up under vagrant, and started running the project, but it wasn’t there, after rewriting a couple of functions, nginx started throwing errors in the logs:

2018/03/20 09:23:45 [error] 3040#0: *9 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class 'CExceptionEvent' not found in /app/ap-office.test/vendor/yiisoft/yii/framework/base/CApplication.php:726
Stack trace:
#0 [internal function]: CApplication->handleException(Object(LogicException))
#1 {main}
  thrown in /app/ap-office.test/vendor/yiisoft/yii/framework/base/CApplication.php on line 726" while reading response header from upstream, client: 192.168.83.1, server: ap-office.test, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "ap-office.test"
192.168.83.1 - - [20/Mar/2018:09:23:45 +0300] "GET / HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"

Actually, I came to the conclusion that autoload does not work. How can this be defeated? Google did not give any results, there is only a solution to the problem with phpexcel, which is actually not in this project. Who can advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-03-20
@slo_nik

Good morning.
For example , you can try this.
There are many more solutions here.
It might work, try it. Although it would not hurt to transfer to a new version of yii.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question