(laravel project on server) HTTP ERROR 500

Published 8 months ago by alihuseyin

my panel : vesta panel os : debian 8x Current PHP version: 7.0.27-1~dotdeb+8.17.0.27-1~dotdeb+8.1

I am getting HTTP ERROR 500

I set the path in index.php

require DIR.'/../MyFolder/vendor/autoload.php'; $app = require_once DIR.'/../MyFolder/bootstrap/app.php';

I tried this but doesnt work for me.

sudo chmod 755 -R MyFolder chmod -R o+w MyFolder/storage --

Anyone can help?

Edit : last edit deleted

wilburpowery

shared hosting?

alihuseyin

@wilburpowery xcloud server

tykus
tykus
8 months ago (663,650 XP)

Do you have your .env file uploaded or preferably ENV VARs on your server?

alihuseyin

@tykus yes I have,

I had upload same project to a shared hosting and it was working fine but not It fails

tykus
tykus
8 months ago (663,650 XP)

I don't use shared hosting anymore...

How are you deploying; are you able to run composer on the server, or do you upload the vendor directory?

alihuseyin

@tykus yes I am able to run composer on the servor and I tried both of ways 1-> creating laravel project on the server 2-> uploading laravel project to the server

tykus
tykus
8 months ago (663,650 XP)

Can you add the root path to your server's php.ini? You would be looking for the open_basedir config

alihuseyin

@tykus my according to this information "Loaded Configuration File : /etc/php/7.2/apache2/php.ini" it doesnt include open_basedir.

here where includes open_basedir path /home/admin/conf/web/website.com.apache2.conf

    ServerName website.com
    ServerAlias website.com
    ServerAdmin [email protected]
    DocumentRoot /home/admin/web/website.com/public_html
    ScriptAlias /cgi-bin/ /home/admin/web/website.com/cgi-bin/
    Alias /vstats/ /home/admin/web/website.com/stats/
    Alias /error/ /home/admin/web/website.com/document_errors/
    #SuexecUserGroup admin admin
    CustomLog /var/log/apache2/domains/website.com.bytes bytes
    CustomLog /var/log/apache2/domains/website.com.log combined
    ErrorLog /var/log/apache2/domains/website.com.error.log
    <Directory /home/admin/web/website.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir  /home/admin/web/website.com/public_html/:/home/admin/tmp/
        php_admin_value upload_tmp_dir  /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
    </Directory>
    <Directory /home/admin/web/website.com/stats>
        AllowOverride All
tykus
tykus
8 months ago (663,650 XP)

You can set open_basedir in your Apache configuration file, php.ini, or in a .htaccess file; so add the directory where you want that was identified as missing in your error above (/home/admin/web/website.com/) to the paths above (or, it looks like you can simply remove the public_html part of the first path.

alihuseyin

@tykus unfortunality it didn't work... I will try to re configure php7+.

tykus
tykus
8 months ago (663,650 XP)

Did you restart Apache?

alihuseyin

@tykus yes I restarted it from vesta panel

Please sign in or create an account to participate in this conversation.