Comments (6)
Could you please run php -r'print_r($_SERVER);'
and php -r 'echo getenv("HOME");'
on your system and post results here?
from drupal-code-generator.
I saw this too. It happens on web requests. The autoloader is loading DCG's bootstrap.php and $_SERVER['HOME'] is not defined.
from drupal-code-generator.
$ php -r 'print_r($SERVER);'
Array
(
[HOSTNAME] => 622336f567d4
[TERM] => xterm-256color
[DRUPAL_VERSION] => 20170531
[COMPOSER_PROCESS_TIMEOUT] => 1200
[BUSINESS_CORE_VERSION] => 20170510
[XDEBUG_CONFIG] => remote_host=172.17.0.1
[PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[PWD] => /var/www/html
[LANG] => C.UTF-8
[SHLVL] => 1
[HOME] => /root
[DEBIAN_VERSION] => 20170511
[DEBIAN_FRONTEND] => noninteractive
[] => /usr/bin/php
[PHP_SELF] => -
[SCRIPT_NAME] => -
[SCRIPT_FILENAME] =>
[PATH_TRANSLATED] =>
[DOCUMENT_ROOT] =>
[REQUEST_TIME_FLOAT] => 1496512972.497
[REQUEST_TIME] => 1496512972
[argv] => Array
(
[0] => -
)
[argc] => 1
)
$ php -r 'echo getenv("HOME");'
/root
from drupal-code-generator.
Well, if the error appears on Web server environment we should follow a different way to check.
Please put this file to you web directory and open in a browser.
<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
var_dump(getenv("HOME"));
from drupal-code-generator.
This is result in browser:
Array
(
[protossl] =>
[HTTP_AUTHORIZATION] =>
[HTTP_HOST] => localhost:8080
[HTTP_CONNECTION] => keep-alive
[HTTP_UPGRADE_INSECURE_REQUESTS] => 1
[HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate, sdch, br
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
[HTTP_COOKIE] => lang=en-US; XDEBUG_SESSION=XDEBUG_ECLIPSE; SESS49960de5880e8c687434170f6476605b=JeE6heXWdMLBjwRc1VGeQtYwjufdwZuPYiixAyyBo_E
[PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[SERVER_SIGNATURE] =>
Apache/2.4.10 (Debian) Server at localhost Port 8080
[SERVER_SOFTWARE] => Apache/2.4.10 (Debian)
[SERVER_NAME] => localhost
[SERVER_ADDR] => 172.17.0.2
[SERVER_PORT] => 8080
[REMOTE_ADDR] => 172.17.0.1
[DOCUMENT_ROOT] => /var/www/html
[REQUEST_SCHEME] => http
[CONTEXT_PREFIX] =>
[CONTEXT_DOCUMENT_ROOT] => /var/www/html
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /var/www/html/test.php
[REMOTE_PORT] => 38716
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /test.php
[SCRIPT_NAME] => /test.php
[PHP_SELF] => /test.php
[REQUEST_TIME_FLOAT] => 1496561802.804
[REQUEST_TIME] => 1496561802
)
boolean false
from drupal-code-generator.
The above commit should fix the notice. Thanks for the report.
from drupal-code-generator.
Related Issues (20)
- Missing opening <?php tag in .module after generating a content entity HOT 2
- generate entity:content adds wrong permissions HOT 10
- Legacy generator support HOT 4
- Allow to name provided answers instead of ordering them HOT 1
- Parent QuestionHelper class is instantiated in some cases and causes a fatal error HOT 4
- Update plugin generators to use PHP attributes HOT 5
- Allow a custom module to be specified as the target location for a new sdc HOT 1
- Drush code gen fails to generate Drush Alias File HOT 1
- Drupal Entity Generator fails to generate functional entity HOT 1
- Drupal Code Generator generates Constraint Validator with wrong constructor definition HOT 2
- Single Directory Component generator refers to metadata.json instead of .component.yml file
- Provide a replacement for Drupal Console generate:ajax:command HOT 2
- Apply Drupal code style for declare(strict_types=1);
- Class naming convention HOT 6
- Add a command to generate batch service
- Config entity form template does not use entity class for machine name exists check
- Add a command to generate plugin derivative
- Create command for generate post_update file HOT 2
- Drupal 10, Drush 11 compatibility with Drupal Code Generator HOT 5
- Add "drush generate readme" command HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drupal-code-generator.