PHP projects not running from localhost on browser

Viewed 373

Following is the output displayed on browser on running any of the Yii project from localhost:

(new yii\web\Application($config))->run();

I have changed my system and the new system has newly installed windows 10, I have installed same xampp version over new system and moved htdocs folder in there. I also have configured Fast CGI in xampp to run two versions of php using same xampp just as I did in previous system's xampp. I have set the path variables for both php versions in system's environment paths. Also, uncommented the following lines from windows host file:

#   127.0.0.1       localhost
#   ::1             localhost

What else should I do to get the project run, what am I missing in setting up the system?

1 Answers

I would fix these issues by following the steps below:

  1. I would try to create a normal PHP script to see if Xampp is working fine.

  2. If the PHP script runs fine then I would create a new Yii project from scratch and try to run it without making any changes to it.

  3. If the Project doesn't work, it means the issue is with the Yii framework, then I would try to use an older version of the framework.

  4. If an empty project works fine then I would migrate my original project source into the newly created Project one by one and try to find the bug on any script on the project.

  5. I would surely find the bug until this step...

Related