I have migrated this site from windows server running IIS to a server running linux oracle 8 and apache.

Everything has been running well. getting ready for version 11 i did some clean up by removing unused packages with composer.  then site broke. i reverted the server snapshot. everything is working.  every time i just run composer update, using th eoriginal working snapshot , the site breaks. not sure if that was some undiscovered issue from the migration but this is the error message i am getting. 

Warning: require(/var/www/html/knowledgebase/vendor/composer/../symfony/deprecation-contracts/function.php): Failed to open stream: Permission denied in /var/www/html/knowledgebase/vendor/composer/autoload_real.php on line 45

Fatal error: Uncaught Error: Failed opening required '/var/www/html/knowledgebase/vendor/composer/../symfony/deprecation-contracts/function.php' 
(include_path='/var/www/html/knowledgebase/vendor/pear/archive_tar:/var/www/html/knowledgebase/vendor/pear/console_getopt:/var/www/html/knowledgebase/vendor/pear/pear-core-minimal/src:/var/www/html/knowledgebase/vendor/pear/pear_exception:.:/usr/share/pear:/usr/share/php') 
in /var/www/html/knowledgebase/vendor/composer/autoload_real.php:45 Stack trace: #0 /var/www/html/knowledgebase/vendor/composer/autoload_real.php(49): {closure}() 
#1 /var/www/html/knowledgebase/vendor/autoload.php(25): ComposerAutoloaderInit707f7590d632e07d7add8405a30a9cb8::getLoader() #2 /var/www/html/knowledgebase/web/autoload.php(15): require('...') #3 
/var/www/html/knowledgebase/web/index.php(14): require_once('...') #4 {main} thrown in /var/www/html/knowledgebase/vendor/composer/autoload_real.php on line 45

not sure how to fix this,  any help is greatly appreciated.

Comments

moses3491’s picture

You should be able to do it by deleting the vendor directory inside your project root and running composer install.

treichelt’s picture

thank you for that tip.  i ran it but site was still not working

i worked my way through the autoload files and found that the one under vendor/composer line 45 was the issue after fixing the issue with running composer. since it kept saying failed to open stream permissions denied i reran the chown and chmod and left chmod with 775 and the site works.  so now i have to adjust to the proper files permissions and should be in good shape.  thanks again