CopyPastor

Detecting plagiarism made easy.

Score: 0.9605105136090083; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-09-07
by Abhishek Thakur

Original Post

Original - Posted on 2016-12-18
by Synchro



            
Present in both answers; Present only in the new answer; Present only in the old answer;

What you're missing is running `composer` install, which will import your packages and create the vendor folder, along with the autoload script.
Make sure your relative path is correct. For example the example scripts in PHPMailer are in `examples/`, below the project root, so the correct relative path to load the composer autoloader from there would be `../vendor/autoload.php`.
The autoload.php you found in `C:\Windows\SysWOW64\vendor\autoload.php` is probably a global composer installation - where you'll usually put things like phpcs, phpunit, phpmd etc.
`composer update` is not the same thing, and probably not what you want to use - if your code is tested with your current package versions then running `update` may cause breakages which may require further work and testing, so don't run `update` unless you have particular reason to. To clarify further - you should probably only ever run `composer update` locally, never on your server.
I often see complaints that people can't use composer because they can't run it on their server (e.g. because it's shared and they have no shell access). In that case, you can still use composer: run it locally (an environment that has no such restrictions), and upload the local vendor folder it generates along with all your other PHP scripts.
What you're missing is running `composer install`, which will import your packages and create the vendor folder, along with the autoload script.
Make sure your relative path is correct. For example the example scripts in PHPMailer are in `examples/`, below the project root, so the correct relative path to load the composer autoloader from there would be `../vendor/autoload.php`.
The autoload.php you found in `C:\Windows\SysWOW64\vendor\autoload.php` is probably a global composer installation - where you'll usually put things like phpcs, phpunit, phpmd etc.
`composer update` is not the same thing, and probably *not* what you want to use - if your code is tested with your current package versions then running `update` may cause breakages which may require further work and testing, so don't run `update` unless you have particular reason to. To clarify further - you should probably only ever run `composer update` locally, never on your server.
I often see complaints that people can't use composer because they can't run it on their server (e.g. because it's shared and they have no shell access). In that case, you *can* still use composer: run it locally (an environment that has no such restrictions), and upload the local vendor folder it generates along with all your other PHP scripts.

        
Present in both answers; Present only in the new answer; Present only in the old answer;