hello,

big problem.

I have a developpment site in my mac, php7, drupal 855.
All is ok.

But when i put all in my site (sgbd + site), deiban 9 and the same configuration, i have this message

Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 4 in Symfony\Component\HttpFoundation\Request->getHost() (line 1303 of /var/www/vendor/symfony/http-foundation/Request.php).

Symfony\Component\HttpFoundation\Request->getHost() (Line: 1570)
Drupal\Core\DrupalKernel::setupTrustedHosts(Object, Array) (Line: 1062)
Drupal\Core\DrupalKernel->initializeSettings(Object) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

this message is over, when i comment this line in settings.php

$config['system.logging']['error_level'] = 'verbose';

But a have problem after that i haven't in local.
Who have an idea ?

thank's for help

yonnel

Comments

mitpatoliya’s picture

I have seen various people struggling  with drupal Installation on mac. I think best solution will be to go for usb server if possible. Because it will take away lot of your installation and migration related  issues. It is highly portable.

yonnel’s picture

My problem is not on the mac 
It is on the server debian !

On the mac all is perfect

yonnel

mmjvb’s picture

on the Mac. Suggest to check that environment. It needs to be configured properly.

grzesag’s picture

does it break the site for you? it should not

this is warning not error - warning should not stop script from execution (it may not run correctly), error would stop script

$config['system.logging']['error_level'] = 'verbose';

you use this to control at the level of Drupal what kind of errors/warnings you see - very useful at development level, and should be disabled on production server you can set this value either via GUI (admin/config/development/logging) or drush command line

drush cset system.logging error_level all

drush cset system.logging error_level some

drush cset system.logging error_level hide

since you commented it (default is hide) you do not see them but it is still Drupal just does not show it for you

$config in settings.php is used to override configuration settings e.g. useful on development instance

warning comes from symfony framework and you can check if version of PHP on Mac and Debian are the same. as of 8.5 Drupal (https://www.drupal.org/docs/8/system-requirements/php-requirements) recommended version of PHP is 7.2 Not sure how experianced developer you are but I had in past situationa (as most of us) where development environemnt was different from production environement (PHP version different) and what was working on dev machine it was breaking on production, or getting numebr of warning or notices as well as errors

I would suggest to check version of PHP on Mac and Debian - best if there are the same. I run 8.5.5 Drupal on Ubuntu 18.04 and I cannot see this warning (I can see different one)

For development I would suggest to use virtual box (run OS in this case Debian 9 and develop things there on set up that is the same as on the production machine), you are aware about this page I guess https://www.drupal.org/docs/develop/local-server-setup

Good Luck

Grzegorz

yonnel’s picture

hello,

Yes easyier to test in a virtual box context. i will see this for next project.

For php : php 7.2. The same than the sever. It's a personnel virtual host i build.

But i have a big interest for this page you done. Il will analyse what is the difference

I suppose the problem come from this.

Thank's for help

yonnel