False Positive – Composer autoload_static.php Automatically Deleted During Upload

Website URL

https://awael.gt.tc

Error Message

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

Fatal error: Uncaught Error: Failed opening required ‘/home/vol8_3/infinityfree.com/if0_43445935/htdocs/vendor/composer/autoload_static.php’ (include_path=‘.:/usr/share/pear/’) in /home/vol8_3/infinityfree.com/if0_43445935/htdocs/vendor/composer/autoload_real.php:31 Stack trace: #0 /home/vol8_3/infinityfree.com/if0_43445935/htdocs/vendor/autoload.php(22): ComposerAutoloaderInit69609fae1c49487af5e046bd6632a8d2::getLoader() #1 /home/vol8_3/infinityfree.com/if0_43445935/htdocs/public/index.php(14): require(‘/home/vol8_3/in…’) #2 {main} thrown in /home/vol8_3/infinityfree.com/if0_43445935/htdocs/vendor/composer/autoload_real.php on line 31

Other Information

Hello InfinityFree Support,

I’m trying to upload a legitimate Composer-generated Laravel autoload file named autoload_static.php to:

htdocs/vendor/composer/

The file is approximately 45 KB and is required by Composer’s autoloader.

However, whenever I upload the original file, it gets automatically deleted from the server.

I performed these tests:

  1. A simple PHP file named test.php uploads successfully.
  2. A simple PHP file named autoload_static.php containing only <?php return true; uploads successfully.
  3. The original autoload_static.php content uploads successfully as a .txt file.
  4. The original file gets deleted when uploaded with its .php extension.

Could you please check whether your malware scanner is incorrectly flagging this legitimate Composer file and help me resolve the issue?

Thank you.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

Your tests rule out most of the usual causes, so a scanner false positive does look likely. I found an article listing why files get deleted right after upload:

It names four causes. Your tests exclude three of them:

  • Location: the file is going into htdocs, and your other .php test files stay there.
  • File type: .php files are allowed.
  • Size: the limit for PHP files is 1 MB, and yours is about 45 KB.

The fourth cause is that uploaded files are automatically scanned for malware, and files that are flagged get deleted. Your results fit that: the same content survives as .txt and is deleted as .php.

I can’t see what the scanner flagged or change its rules, so I can’t say whether this is a false positive. A person on our staff would need to look at that.