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

knt's avatar
Level 10

@bipin, thank you for your help. I'm using MAMP, should i do that via a terminal?

@Snapey, i copied everything, because i compressed it first and then download. For the .env here's the code:

APP_ENV=local APP_KEY=base64:rpoyQZafr2KQYo9EyYkGzRRY2zsEaufambqF0fiRrG0= APP_DEBUG=false APP_LOG_LEVEL=debug APP_URL=http://localhost IMG_DOMAIN=http://localhost APP_TYPE=2

DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=<db_name_here> DB_USERNAME=root DB_PASSWORD=root

CACHE_DRIVER=array SESSION_DRIVER=file QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379

FROM_ADDRESS=<text_here> FROM_NAME="<text_here>" MAIL_DRIVER=sendmail MAIL_HOST=<text_here> MAIL_PORT=<text_here> MAIL_USERNAME=<text_here> MAIL_PASSWORD=<text_here> MAIL_ENCRYPTION=tls

CLIENT_ID=<text_here> CLIENT_SECRET=<text_here> REDIRECT=/auth/facebook

Please advise if my .env file is correct or not. Thank you

bipin's avatar

@knt you .env file look fine i think your problem with your phpmyadmin open phpmyadmin in browser if you seen access denied then your problem is phpmyadmin try to restart you service mamp if still not work then restart you services by opening window services

knt's avatar
Level 10

@bipin, yes. You're right, i get this error when i visit phpmyadmin page:

#1045 - Access denied for user 'root'@'localhost' (using password: YES)

knt's avatar
Level 10

@bipin thank you. i'm watching it.

Do you think the 500 Internal Server Error is caused by this?

knt's avatar
Level 10

@bipin, i see. still no luck with phpmyadmin. I followed the video but it didn't work.

bipin's avatar

@knt reinstall you mamp another problem with phpmyadmin if your .env file has password and your local server (mamp) phpmyadmin does not have password then this my give error

knt's avatar
Level 10

@bipin, it is working now. What is wrong with my computer. But when i view my site, the homepage works but when i click a button, it still gives 500 Internal Server Error.

knt's avatar
Level 10

@bipin, @Snapey, @Vijay Thank you for helping me.

The site is working locally now, it's just that when i click a button, to go to another page, it gives a 404 error. Is that a problem in the routes.php?

bipin's avatar

check your url define at that button and find that your in your routes.php if it present then nothing wrong with your routes.php

knt's avatar
Level 10

@bipin, this is becoming a pain. It's very hard. I can see it in the routes.php but it doesn't work.

I think it would be easier if i clone this project on the live server. And do the modifications on the cloned one. What do you think?

bipin's avatar

@knt if you clone it in live server then it closely verify that your .env file pointing to different database

  1. is you button using ajax to send data to controller

it will be too good if you modify you project in local

bipin's avatar

@knt go to your project->storage->logs->laravel.logs copy and paste all thing here let me check what it causes error

knt's avatar
Level 10

@bipin,

it will be too good if you modify you project in local.

Yes i agree. But i only have 5 days to do it. That's why i decided to modify it online.

is you button using ajax to send data to controller

I'm not really sure if it's ajax or not, because it was just handed over to me from another dev. Unfortunately, i only tried laravel 3 days ago. So my knowledge is very limited.

Are there any other files in laravel that i should change so that my cloned site will still work, without touching the live one?

bipin's avatar

where you getting 404 error is in your browser developer mode can you show me image Just give me error image link

knt's avatar
Level 10

@bipin, What do you mean browser developer mode?

If you mean, on my local machine. Then yes. But i've decided to work directly on the live site and clone it

Previous

Please or to participate in this conversation.