Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Problem with migration to Apache

Started by Pavel 7 years ago · 6 replies · 672 views
7 years ago

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:

<code>$defaults = (array)$config->get('system.pages.markdown');
if (isset($this->header()->markdown)) {
$defaults = array_merge($defaults, $this->header()->markdown);
}
</code>

And it's throwing following ErrorException during load admin:

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

Can someone helps me?

7 years ago

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.error-grav|690x293

7 years ago

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?

7 years ago

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...)

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 9 hours ago
General · by pamtbaau, 15 hours ago
1 51 14 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago