I have a php project that was running on xampp but i created an ec2 instance with linux and i access it with his private ip on putty because the web app is supposed to be accessible just via intranet. i used stp to move the whole project, everything works the same but the composer on some php files give me that error( i got it from apache log)
PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/host/public_html/vendor/composer/../ezyang/htmlpurifier/library/HTMLPurifier.composer.php' (include_path='.:/usr/share/php') in /var/www/html/host/public_html/vendor/composer/autoload_real.php:41\nStack trace:\n#0 /var/www/html/host/public_html/vendor/composer/autoload_real.php(45): {closure}()\n#1 /var/www/html/host/public_html/vendor/autoload.php(25): ComposerAutoloaderInitc3b80a39a0d2307602d3e5706c8f19a8::getLoader()\n#2 /var/www/html/host/public_html/accessdata.php(18): require('...')\n#3 {main}\n thrown in /var/www/html/host/public_html/vendor/composer/autoload_real.php on line 41, referer: http://host/page1.php
i use composer to use the phpoffice, the user should be able to upload some excel files then using php i upload them on a database
EDIT: when running composer install
i get this error
Failed to download myclabs/php-enum from dist: curl error 28 while downloading https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483: Connection timeout after 10001 ms
You have a serious misunderstanding that should be put out of the way right from the beginning:
So you have certainly a relationship problem in your Composer marriage.
Composer therapist Nico Haase already commented, "You don't need to install Composer on any production system" and if you're looking for a second opinion, I second that. I actually would say, if you're installing Composer on a production system you're asking for trouble, problems, broken hearts (and dependencies).
You write it your own:
i [sic!] uploaded from local copy, i dont [sic!] have internet access on the server
So, build the vendor folder locally with Composer, then upload the whole application code (including the vendor directory). Done.
Yes, done.
Machine working again.
And they lived long and happily.
(It may require reading, as every couples therapy is with the work of each individual to find back together. This can be a daunting time, always remind the bright outlook and all the future you two will have together, exploring the wild corners of the intranets together.)