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

rlw92's avatar
Level 1

Render hosting issues

Hi there.

I am trying to host a small laravel project for my portfolio on a site called Render, but i am experiencing great difficulty in getting it to work. I have asked on their forums and have gained no reply.

I am following their instruction to no avail and the errors coming back are these:

WARNING: [pool www] child 83 said into stderr: "NOTICE: PHP message: PHP Fatal error: require(): Failed opening required '/var/www/html/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/html/public/index.php on line 34"

[error] 75#75: *115 FastCGI sent in stderr: "PHP message: PHP Warning: require(/var/www/html/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/public/index.php on line 34PHP message: PHP Fatal error: require(): Failed opening required '/var/www/html/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/html/public/index.php on line 34" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "haunted-inventory-laravel.onrender.com"

Has anyone deployed their laravel project to render before and can give me a helping hand? Or figure out why this is happening?

The git repo of the project is /rlw92/haunted-inventory-laravel

Any help would be greatly appreciated. Thank you.

0 likes
9 replies
jlrdw's avatar

As a first check make sure you have the correct php version.

technofreaks's avatar

Hi

Thank you for github reference.

"NOTICE: PHP message: PHP Fatal error: require(): Failed opening required '/var/www/html/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/html/public/index.php on line 34"

Line 34 of index.php

require DIR.'/../vendor/autoload.php';

check for vendor folder,

what is the path of vendor folder?

rlw92's avatar
Level 1

I mean the render instructions I followed said to put it in the gitignore and dockerignore files. And the example directory, that does work, doesnt have it in either.

I have just taken it out of the gitignore and dockerignore files and still having issues except the errors showing on the log now show:

Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.3.6. in /var/www/html/vendor/composer/platform_check.php on line 24" while reading upstream, client: 127.0.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "haunted-inventory-laravel.onrender.com"

Yet when I run php -v on my local server I get this:

PHP 8.1.10 (cli)

Does this mean render itself is only operating on php 7.3.6 and my version is too advanced?

gych's avatar

Did you run composer install when deploying ? Can you share the deploy script that you're using.

rlw92's avatar
Level 1

#!/usr/bin/env bash echo "Running composer" composer install --no-dev --working-dir=/var/www/html

echo "Running migrations..." php artisan migrate --force

#echo "Running seeders..." #php artisan db:seed

#echo "Running vite..." npm install npm run build

martinbean's avatar

@rlw92 Why is your actual application inside another folder named haunted-inventory?

Your error is suggesting Composer dependencies aren’t being installed, so are you sure you’re running composer install in the right directory, if at all?

You’re either:

  1. Not running composer install at all
  2. Not running composer install from the correct directory
  3. If Render is meant to do it, then it’s not because you’ve randomly nested your project in another folder and therefore Render isn’t finding your composer.json in the expected location
rlw92's avatar
rlw92
OP
Best Answer
Level 1

If anyone runs into this problem again. Its because you are using laravel 10 with vite. These files need to be bundled. Also I believe I had named some views wrong.

I followed this github repos instructions /cba85/laravel-render Along with the render config files to deploy to Render.

rlw92's avatar
Level 1

@martinbean Any insight as to what changed to make it work then? What do you think made it work?

Please or to participate in this conversation.