# Cant connect to MySQL DB from PHP



## xy16644 (May 9, 2014)

When I try to run a PHP webpage from a browser that is trying to connect to a database the following is logged in httpd-error.log:

```
PHP Fatal error:  Call to undefined function mysqli_connect()
```
What could be causing this issue? I can run other PHP pages fine, just not the ones with test SQL statements in them. I have Googled this error but I still haven't had any luck in resolving it.


----------



## Ben (May 9, 2014)

You are missing the port databases/php5-mysqli. This is required.

Other scripts might be using databases/php5-mysql so they are working.


----------



## xy16644 (May 9, 2014)

Thank you, that got it all working!


----------

