0

Any idea why this isn't working? jm-svr is the local DNS name of the Synology box Apache 2.4 server. I have swapped out the DNS name for localhost and for the IP address

$DB = mysqli_connect("jm-svr", "UserName_Here", "Password_Here", "DB_Name_Here");

DB server MariaDB10.3.21.0063

PHP error message: Fatal error: Uncaught Error: Call to undefined function mysqli_connect()

Dharman
  • 30,962
  • 25
  • 85
  • 135
josh
  • 11
  • 2
  • Have a look at https://stackoverflow.com/questions/14047204/how-to-prevent-catch-connection-error-with-mysqli it might help in checking for errors (if any). – Nigel Ren Jun 12 '20 at 15:41
  • What error message are you getting? How do you know this is not working? Do you even have error reporting enabled? [How to get the error message in MySQLi?](https://stackoverflow.com/a/22662582/1839439) – Dharman Jun 12 '20 at 15:58
  • @Dharman Fatal error: Uncaught Error: Call to undefined function mysqli_connect() – josh Jun 12 '20 at 16:25
  • Solved, needed to enable MySql plugin for php in Synology WebStation – josh Jun 12 '20 at 16:39

0 Answers0