Giter VIP home page Giter VIP logo

Comments (6)

Chi-teck avatar Chi-teck commented on July 26, 2024

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.

weitzman avatar weitzman commented on July 26, 2024

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.

hejiann avatar hejiann commented on July 26, 2024

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

Chi-teck avatar Chi-teck commented on July 26, 2024

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.

hejiann avatar hejiann commented on July 26, 2024

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.

Chi-teck avatar Chi-teck commented on July 26, 2024

The above commit should fix the notice. Thanks for the report.

from drupal-code-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.