Upload failed!

I received this problem and realized that the autoload_static.php file was deleted, but after trying to upload it again several times or using FileZilla, the file was still deleted from the composer folder.

Warning : require(/home/vol10_3/infinityfree.com/if0_36657171/htdocs/vendor/composer/autoload_static.php): Failed to open stream: No such file or directory in /home/vol10_3/infinityfree.com/if0_36657171/htdocs/vendor/composer/autoload_real.php on line 29

Fatal error : Uncaught Error: Failed opening required ‘/home/vol10_3/infinityfree.com/if0_36657171/htdocs/vendor/composer/autoload_static.php’ (include_path=‘.:/usr/share/pear/’) in /home/vol10_3/infinityfree.com/if0_36657171/htdocs/vendor/composer/autoload_real.php:29 Stack trace: #0 /home/vol10_3/infinityfree.com/if0_36657171/htdocs/vendor/autoload.php(25): ComposerAutoloaderInit8602c2d83e66f7e712973b25390f61af::getLoader() #1 /home/vol10_3/infinityfree.com/if0_36657171/htdocs/public/index.php(34): require(‘/home/vol10_3/i…’) #2 {main} thrown in /home/vol10_3/infinityfree.com/if0_36657171/htdocs/vendor/composer/autoload_real.php on line 29r question)

how can i fix this?

It is probably too big

3 Likes

Looking at the file name, it seems to be an optimized Composer autoload file. Depending on the packages installed with Composer, that file can grow quite big, over the 1 MB file size limit for PHP code.

To fix this, you can regenerate your Composer files without the optimized autoloader. To do so, you should check your composer.json file for the config.optimize-auoloader key, and make sure it’s absent or set to false. Then run composer dump-autoloader to regenerate the autoloader, and upload the updated vendor folder.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.