Unabel to upload autoload_static.php from my local composer folder to server

Username (e.g. epiz_XXX) or Website URL

User name [epiz_31870964] (Login to your account - InfinityFree)

Websiter URL: https://matrimony.infinityfreeapp.com/

(please specify the website or account you are asking about)

Error Message

(please share the FULL error message you see)
As I cannot use composer on free server, I installed composer related files on my local and tried to upload it on server but 2 files in /vendor/composer/ folder are not uploading.
Files I am trying to upload are of size around 1 - 2 MB only. I am not able to upload it via FTP or via cpanel file uploader

Due to that I am getting following error.

Fatal error : require_once(): Failed opening required ‘/home/vol6_3/epizy.com/epiz_31870964/htdocs/vendor/composer/autoload_static.php’ (include_path=‘.:/usr/share/pear/’) in /home/vol6_3/epizy.com/epiz_31870964/htdocs/vendor/composer/autoload_real.php on line 31

Other Information

(other information and details relevant to your question)

I can not attach those 2 files here as it is saying that sorry new users can not attach files.

This is strange thing.

Please let me know the solution to this strange behavior of your server.

Thank you.

There is a limit of 1 MB for PHP files on our hosting, so any file larger than that would be automatically deleted.

One possible way I see is to regenerate your Composer files without the --optimize-autoloader option. This may give you a small performance hit in production, but it avoids these large generated PHP files with class information.


Can’t you exceed it to 2 MB atleast ? I think it is not good to restrict upload script file size.

what do you expect from free hosting? No restrictions for free? haha

Sorry, that’s not possible.

1 Like

Well, atleast you should allow it to have enough size to run scripts …
Otherwise what is its use if we are to run only static sites.

I tried the option you gave for composer but it does not seem to help.

I appreciate that they are allowing free host but what is the use of it if you can not run your scripts?

There are plenty of other restriction already… like you can not create emails, you can not run composer or other commands etc… Atleast you should give people enough to run space atleast…

And I think if people like me like free hosting then only they would think to buy it. If free hosting does not work properly what is use of buying it with money…
First impression is last impression… that is what I think.

Also overall space limit like restriction of site size to be 1gb or less should be ok for free site but restriction on individual script file size does not seem logical to me… currently…
May you might have your own logics behind that…

It can run WordPress. And WordPress is by no means a small script.

The size restrictions are there for a reason. Weather or not you want to except these restrictions is entirely up to you. Regardless, the limits will not change, as 99% of people are happy with them being there, as they are never affected.


I think you misunderstood the point. It is not the size of a project as a whole that is problem.
Problem is restriction of single script file being more than 1 MB.

Mine script is under laravel which uses composer and its autoload static file and map file is more than 1MB which is not what I have created. It is generated by them automatically.
So my point was about restriction of single file size which should not be there or should be somewhat more flexible…

I know that wordpress is not a small script but is it possible for wordpress with single php script file having more than 1MB of size to be able to upload and run on free server?

So problem is not the size of a project as a whole but single file which is more then 1 MB and free server is not allowing which to be uploaded and without which project can not run… Either it is wordpress or laravel or any other project.

Yes, as I told you before it is not logical for me that you allow unlimited space for whole project but limited space for single file size but you must have your own logic behind that.
I was just trying to find some solution around if someone might have faced this before and might have solved it in some logical way for composer.


No, each hosting account is allocated 5gb for storage.

This is to prevent account to be used for file hosting purpose.
I guess it’s time for you to move on


I am sorry for the confusion that has been caused.

Composer may have optimized your autoload file, subsequently making it larger in size. If I am correct, all you will need to do is remove the auto load files and the vendor/composer directory and then execute composer dump-autoload.

Also, it would be helpful to know which packages composer is requiring (can you please share them). Because, as you should know, the more packages to require, the larger the autoload file/class.


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