Problem with migration to Apache

I have tried to deploy my Grav project to Apache, but it’s complicated. I have to test before deploy this Grav’s website on shared hosting so I emulated docker-apache-php7.1 enviroment (grav-docker-apache precisely).

When I want to load grav it’s throwing following ErrorException:

“array_merge(): Argument #2 is not an array”

in this line:

$defaults = (array)$config->get(‘system.pages.markdown’);
if (isset($this->header()->markdown)) {
$defaults = array_merge($defaults, $this->header()->markdown);
}

And it’s throwing following ErrorException during load admin:

"Declaration of Grav\Plugin\Babel\BabelSearch::setTokenizer(TeamTNT\TNTSearch\Support\TokenizerInterface $tokenizer) should be compatible with TeamTNT\TNTSearch\ ▶"

Can someone helps me?

Does your docker image have at least php 7.1.3, as listed in the requirements ?

Yes. PHP 7.1.7 is installed.

It’s not apache case definitely. I have deployed this my Grav’s project on another Nginx (docker php-fpm 7.3) and Grav throws the same error. Anyone knows why I have this error?

I have enabled php modules on machine:
[PHP Modules]
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
SimpleXML
soap
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

I have attached screenshot too.

I solve it, but I have another error.

Whoops \ Exception \ ErrorException (E_NOTICE)
Undefined index: path on 43 lines of custom-css.php

Have you have Dockerfile with linux (i.e. alpine, ubuntu), newest php, newest grav and apache/nginx enviroment and all neccessary modules to launch grav?

sure - I’m currently using the official grav docker file from GitHub
even easier to use with this docker-compose.yml file:

version: ‘2’

services:
grav-php:
image: grav:latest
container_name: grav-php
ports:
- “8080:80”
restart: always
volumes:
- ./grav:/var/www/html:cached

(indentation is wrong, I know, probably due to the forum editor…)

Nginix ??? :thinking: