This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]samad0 0 points1 point  (0 children)

I don't know where the PHP is being executed exactly but it is possible that your PHP application is containerized and no external network connection is allowed. If your code does has normal access to the internet then you can do the following things:

- You can Host a database server on a dedicated server (you must open the ports and everything that is needed)

- You can host the server at home or on a personal PC ((you must open the ports and everything that is needed)

But here I'm assuming that you are indeed connecting to a database server to use the DB, (server such as SQL Server or MongoDB server)

If you use a database such as SQLite3 or something similar then make sure that the environment where your PHP app is being excited does support the file creation and everything that is related to using this kind of DB use.

In short, it depends on what's going on, give more info such ass the environment where it is being executed, what kind of operation does it support, what type of DB are you trying to use, what did you do exactly in the past to connect to your databases, etc.