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

jozi's avatar
Level 1

Help To Starting The Laravel Scheduler in Hosting...

...

0 likes
14 replies
Snapey's avatar

You have bigger problems. Your database password is

DB_PASSWORD=fl3Uv******QTK84

which I was able to find just looking at the urls you posted and the fact that you have put your whole project into the public_html folder instead of ABOVE the public_html folder, out of the way.

You need to fix this as a priority and also change your DB credentials and app key.

Regarding your issue, you need to locate the correct location of php. If you cannot do this, ask your hosting company.

1 like
jozi's avatar
Level 1

@Snapey

how to fix this problem ?

i have 1 host and 4 domin that all of them with seprate domin ...

and public_html just contain of ferst project...

Cronix's avatar

how to fix this problem ?

It's been discussed many times on the forum. The /public dir needs to be the DocumentRoot. If you can't change that on your host, then you have to do some workarounds. In the searchbox at the top of the site, enter "shared hosting" and start reading. The answer on how to do it depends on your environment (nginx/apache/etc).

1 like
Snapey's avatar

You can rename your local public folder to public_html. Test the site locally and make sure everything works as before

Then you can load everything to the folder above your shared host public_html folder so that your local public_html replaces the same one on the server.

Forget the idea of running multiple sites in the same shared host.

If your host does not allow you to write above public_html then switch hosts. You are spoiled for choice - don't settle for a host that does not give you what you need.

jozi's avatar
Level 1

@Snapey

how to test that my project secure?

you how get db passwords?

jlrdw's avatar

Study previous good answers.

1 like
jozi's avatar
Level 1

@Snapey

tnx a lot for help

To securely use laravel on shared hosting, it’s important to separate the public folder. This secures the environment file etc.

Create a folder outside of your public_html folder, called application. To this newly created folder you upload all but the public folder to. This is where your app, resources, storage etc. will now be located.

Go to your public_html folder, and upload the contents of your public folder. Edit the file called index.php and locate this piece of code.

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

And replace it with the following.

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

Do the same for bootstrapping, replace the below.

$app = require_once DIR.'/../bootstrap/app.php';

With the following.

$app = require_once DIR.'/../application/bootstrap/app.php';

At last go back to the application folder, and edit the permissions of the storage folder by right clicking. Set permissions recursively to 777. This folder is for cache, files, logs etc. and must be accessible by the system. The application is now secure.

this is a right way?

Cronix's avatar

777 is the most insecure permissions you can do. It opens everything to everyone.

Snapey's avatar
Snapey
Best Answer
Level 122

that solution was surely written by an idiot

1 like
jozi's avatar
Level 1

@Cronix

@Snapey

which permissions can help?

i need all site on shared hosting...

please help me...

Snapey's avatar

Its not a permissions issue. I gave you some good advice earlier.

Please or to participate in this conversation.