MySQL/PHP connection not working on remote server...500 error

I’m getting a 500 error on the server for my database query API. I’m not that familiar with how to troubleshoot what’s not working. PHP versions are 7.3.21 local, 7.3.31 remotely. Setup a test page with database login details and that works fine. ANY guidance is welcome. Thanks

This might help:

Thanks bpj - I attempted to search the community but my terms weren’t on the right track.

Here’s the results:

Research has pointed at the following possible issues:

  1. could be MySQL server misconfigured - on a shared server - need to research how to look at this adjusting it.
  2. I’m using a view to deliver the data. Read a stack overflow log that said this could be part of the issue - going look at redoing my query this afternoon.

Open to insight and guidance …

You need to set the prepare statements option in the database connection settings to true. Check:

That was the ticket. Moving on… Thanks - apologies for not getting a better search done to begin with.

1 Like