I developed a website using Symfony2. Unfortunately, the website was deleted on the hard disk and I lost all my work.
However, I have succeed to recover my project sources folder (the one that was in www
folder of Wampserver) thanks to a files recovery software called "EaseUS Data Recovery Wizard".
I have installed Wampserver 2.5 and I have put the folder that I have restored in the www
folder of Wampserver. The problem is that whenever I try to access to the home page of my website, I see the error message below:
Fatal error: Class 'Composer\Autoload\ClassLoader' not found in C:\wamp\www\Wkayet_project\PFESymfony2\vendor\composer\autoload_real.php on line 23
I really wonder why I get such an error message although I put the right URL address! So, my question is: how can I tackle this problem?
This is the content of the composer.json file that I have:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}
Edit2
When I run this command: composer install , I get what is below on my screen:
[Seld\JsonLint\ParsingException]
"./composer.lock" does not contain valid JSON
Parse error on line 1:
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
When I run this command: composer --version , I get what is below on my screen:
Composer version 1.0-dev <f85d965732d9505b69242a070dc0b381c9f6bbab> 2015-10-19 10:04:38
When I run this command: composer diagnose , I get what is below on my screen:
Checking composer.json: FAIL
Defining autoload.psr-0 with an empty namespace prefix is a bad idea for performance
Checking platform settings: FAIL
The xdebug extention is loaded, this can slow down Composer a little.
Disabling it when using Composer is recommended.
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK