# Nginx and php7.0



## Airost (Oct 15, 2017)

Hi,
I have nginx, mysql56-server, php56, php56-mysql installed using tutorial on youtube




I have downloaded a web interface for teamspeak and it's asking for php 7.0 so I have installed port  /usr/ports/lang/php70/ 
How do I update nginx.conf so it uses php7.0?
my nginx.conf looks like this:

```
user  www;
worker_processes  1; #No. of processors
error_log /var/log/nginx/error.log info;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    access_log /var/log/nginx/access.log;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name linoxide.com www.linoxide.com;
        root /var/www;
        index index.php index.html index.htm;

        location / {
            try_files $uri $uri/ =404;
        }
        error_page      500 502 503 504  /50x.html;
        location = /50x.html {
            root /usr/local/www/nginx-dist;
        }
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                include fastcgi_params;
        }
    }
}
```


Please advise.
Thanks


----------



## drhowarddrfine (Oct 15, 2017)

www/nginx does not use PHP. It only "calls" your PHP script as instructed in your config file. It is your PHP script that uses lang/php70.


----------



## Airost (Oct 15, 2017)

So how can I resolve a message on the website


```
Required function "utf8_encode" is missing


Required PHP extension: mbstring has not been found on the server.

For PHP 7.0 (recommended), install this package: sudo apt-get install php-xml php7.0-xml and restart apache. Otherwise, installation instructions can be found on Google ;)

If you are using Web Hosting service, please contact the Hosting support for instruction on enabling needed packages.

© Wruczek 2016 - 2017 | ts-website v 1.4.5 | MIT License
```

Above message comes up instead of a website.


----------



## drhowarddrfine (Oct 15, 2017)

They are calling your operating system a "server". They state this is a PHP extension for PHP that needs to be there. nginx is server software but has nothing to do with PHP or how it's used.


----------



## Airost (Oct 15, 2017)

So is it website not working properly? Or maybe php-fpm not configured then if that is nothing to do with nginx?


----------



## Airost (Oct 15, 2017)

Ok thread can now be closed. Been sitting with it all night and  php70-extensions  was needed to install


----------

