Which of the config?

|
justine_chacko 2020-12-20 05:56:45
Jomitz 2020-12-20 05:56:27
Its better to treat API code and web codes as different controllers and files

ok

Jomitz 2020-12-20 05:56:49
Because you may need to change many things in the both differently
Jomitz 2020-12-20 05:57:16
Just make an API folder in controller for it
justine_chacko 2020-12-20 05:58:07
ok
Jomitz 2020-12-20 06:05:55
focalfossa20 2020-12-20 05:09:48
https://pastebin.com/wF7bxCXV

Send the join query code for pagination

Ant_Jr 2020-12-20 06:27:36
laravel_discuss-63341.jpg
Hi, what could be the cause of this when the site was working fine for about a month on a shared hosting?
Mtzare 2020-12-20 06:33:14
Ant_Jr 2020-12-20 06:27:36
Hi, what could be the cause of this when the site was working fine for about a month on a shared hosting?

Hi
check db is exist !?
you may been hacked.
your mysql user : “worldma_antt” is not exist or no permission to mysql.

Ant_Jr 2020-12-20 06:34:52
I removed the entire db created a new one will a single with all privileges yet nothing
ktmsulaim 2020-12-20 06:35:48
Ant_Jr 2020-12-20 06:27:36
Hi, what could be the cause of this when the site was working fine for about a month on a shared hosting?

Always set app_debug to false in production mode. Security issue!

Mtzare 2020-12-20 06:36:02
you need to give permission for new db
Ant_Jr 2020-12-20 06:36:26
ktmsulaim 2020-12-20 06:35:48
Always set app_debug to false in production mode. Security issue!

had 500 error before changing it back to debug mode

Mtzare 2020-12-20 06:36:59
Ant_Jr 2020-12-20 06:36:26
had 500 error before changing it back to debug mode

after problem solved change debug to false.

Ant_Jr 2020-12-20 06:38:04
Mtzare 2020-12-20 06:36:02
you need to give permission for new db

laravel_discuss-63348.jpg
No difference yet done that already

Ant_Jr 2020-12-20 06:38:17
Mtzare 2020-12-20 06:36:59
after problem solved change debug to false.

noted

ktmsulaim 2020-12-20 06:39:19
Credential is crct in env? Also check database.php in config folder
Mtzare 2020-12-20 06:39:52
did you check your .env file ?
Ant_Jr 2020-12-20 06:40:33
All is corrected
Ant_Jr 2020-12-20 06:41:06
downloaded the project and it’s still working fine on my dev server
Ant_Jr 2020-12-20 06:41:22
Don’t know what could be the cause
ktmsulaim 2020-12-20 06:41:53
Restarting apache may help!
Mtzare 2020-12-20 06:42:20
it’s not a complex problem . it’s very simple and your config has an issue.
Ant_Jr 2020-12-20 06:42:53
ktmsulaim 2020-12-20 06:41:53
Restarting apache may help!

Yeah had that in mind contacted the hosting provider to do that cuz I don’t have SSH access

Ant_Jr 2020-12-20 06:43:17
Mtzare 2020-12-20 06:42:20
it’s not a complex problem . it’s very simple and your config has an issue.

Which of the config? so I can check

Mtzare 2020-12-20 06:43:30
let me … brb
carolinemms 2020-12-20 06:44:02
I think .env in the database section is adjusted to the database on the user account in phpmyadmin
ktmsulaim 2020-12-20 06:45:05
I think updating databse.php in config with crct credentials may fix…some times env may not load in the beginning
Ant_Jr 2020-12-20 06:45:35
carolinemms 2020-12-20 06:44:02
I think .env in the database section is adjusted to the database on the user account in phpmyadmin

laravel_discuss-63362.jpg

ktmsulaim 2020-12-20 06:46:35
Ant_Jr 2020-12-20 06:45:35

Also, in database.php

Ant_Jr 2020-12-20 06:46:48
ktmsulaim 2020-12-20 06:46:35
Also, in database.php

updating now

Ant_Jr 2020-12-20 06:49:31
same error
Mtzare 2020-12-20 06:50:41
create a new simple empty db
and try this script
Mtzare 2020-12-20 06:51:11
<?php
try {
$dsn = “mysql:host=localhost;dbname=apidb”;
$user = “root4”;
$passwd = “”;
$pdo = new PDO($dsn, $user, $passwd);
}catch (exception $ex) {
echo $ex->getMessage();
}
Mtzare 2020-12-20 06:51:21
change user,pass,db
Mtzare 2020-12-20 06:53:53
after run this . if you get no message . then there is no problem across the server
Ant_Jr 2020-12-20 06:54:23
trying now
|