Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: When i use external db , My page return Bad gateway 502. #1188

Closed
shafiqruslan opened this issue Dec 7, 2024 · 4 comments
Closed
Labels

Comments

@shafiqruslan
Copy link

shafiqruslan commented Dec 7, 2024

Platform

macOS

Operating system version

macOs Sonoma

System architecture

Mac M2

Herd Version

1.13

PHP Version

No response

Bug description

Hi, i just using laravel herd to replace my laravel valet. Right now, I'm having an issue when i connected external db with my laravel app, it return 502 bad gateway. It working fine if i using local db. Can i know how can i solve this issue .

DB_CONNECTION=oracle
DB_HOST=xx.xx.xx.xx
DB_PORT=1521
DB_DATABASE=xxx
DB_USERNAME=xxx
DB_PASSWORD=xxx

Screenshot 2024-12-07 at 4 36 25 PM

Steps to reproduce

use an external db like below example:

DB_CONNECTION=oracle
DB_HOST=xx.xx.xx.xx
DB_PORT=1521
DB_DATABASE=xxx
DB_USERNAME=xxx
DB_PASSWORD=xxx

Relevant log output

No response

@issuelabeler issuelabeler bot added the macOS label Dec 7, 2024
@chrispeeters
Copy link

I seem to have a similar issue after updating to Herd 1.13.0 today, all of my five repos now fail with "502 Bad Gateway", MacOs 14.5 (23F79) Apple M2 Max, Postgres DB

@mpociot
Copy link
Member

mpociot commented Dec 7, 2024

This must be related to the latest PHP updates 🤔

Maybe @crazywhalecc has an idea

@crazywhalecc
Copy link

@chrispeeters @shafiqruslan Any other informations for your herd-php? for example: php -i and minimal reproducable code.

@chrispeeters
Copy link

After a lot of trial and error I uninstalled and reinstalled Herd; that did not solve the problem. Then I looked more into the actual 502 Bad gateway error and used lsof -i :80 from the command line to find that there where lot of entries for valet hanging on port 80.
These entries were originating from my pre-Herd valet installation; found and deleted the (non-Herd) valet directory. That did away with the port 80 instances and solved the problem outright. Herd is now behaving as expected.

@mpociot mpociot closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants