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

Found this PDOException occurred (enable debug mode) in message #1030

Closed
Hakkey opened this issue May 1, 2024 · 6 comments
Closed

Found this PDOException occurred (enable debug mode) in message #1030

Hakkey opened this issue May 1, 2024 · 6 comments
Assignees

Comments

@Hakkey
Copy link

Hakkey commented May 1, 2024

Screenshot (118)

i got this error when i tried to fetch the "users" table from my db of mysql

what is the possible error for this? thanks!

@mevdschee
Copy link
Owner

Hi. Something went wrong in the PDO driver. Please enable debug in the config and check the (HTTP) response headers in the network tab of the developer tools. Kind regards, Maurits

@mevdschee mevdschee self-assigned this May 1, 2024
@Hakkey
Copy link
Author

Hakkey commented May 1, 2024

Screenshot (120)

is it this one?

@mevdschee
Copy link
Owner

mevdschee commented May 1, 2024

There is a config setting named "debug" and it should be set to "true" and the "Headers" tab is two tabs to the left on the screenshot.

@Hakkey
Copy link
Author

Hakkey commented May 1, 2024

i have found the error which why the connection is refused, so in my case the database is from another host let's say "10.9.0.0.1". Is there a way to pass the db host to the config model?

@mevdschee
Copy link
Owner

Yes, you can set the "address", as per README:

"address": Hostname (or filename) of the database server (localhost)

from: https://github.com/mevdschee/php-crud-api?tab=readme-ov-file#configuration

@Hakkey
Copy link
Author

Hakkey commented May 2, 2024

Okay got it, thanks!

Cool project anyway keep it up

@Hakkey Hakkey closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants