Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vinschi's avatar
Level 16

Error exception in autoload but not fixed with composer dump-autoload

Hi guys, after I uploaded my laravel app to my hosting I have this problem. I have a contact page with a classic form (from, subject, email, body) that creates a contactEmail object and the admin can read it from the dashboard. However, as soon as I create this fake email from this form I have this error:

(1/1) ErrorException
include(/web/htdocs3/mywebsitecom/home/mywebsite/vendor/composer/../../app/contactEmail.php): failed to open stream: No such file or directory
in ClassLoader.php (line 444)
at HandleExceptions->handleError(2, 'include(/web/htdocs3/mywebsitecom/home/mywebsite/vendor/composer/../../app/contactEmail.php): failed to open stream: No such file or directory', '/web/htdocs3/mywebsitecom/home/mywebsite/vendor/composer/ClassLoader.php', 444, array('file' => '/web/htdocs3/mywebsitecom/home/mywebsite/vendor/composer/../../app/contactEmail.php'))
in ClassLoader.php (line 444)

As soon as I delete the record from the table contact_emails in the data base everything works again. Any ideas? Thanks a lot

0 likes
3 replies
roshangautam's avatar

try running composer dump-autoload. Looks like an autoload issue. Sometimes errors within a class also cause autoload issues. Make sure everything inside your contactEmail class is resolving and imported properly.

vinschi's avatar
vinschi
OP
Best Answer
Level 16

@roshan.gautam I fixed it, the problem was that the server is linux so is case sensitive on the name of the classes, there was a typo and instead of a C there was c. Thanks anyway for the help :)

Please or to participate in this conversation.