Bad Server Response

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rtulsiani
    Junior Member
    • Dec 2015
    • 8

    Bad Server Response

    Just installed espocrm, i'm getting 'bad server response' alert message right at the top of the page.

    espocrm version: 3.9.2
    there is no error log produced

    verified with host the Server requirements are supported and enabled
    see: http://trainingedgeca.netfirms.com/info.php

    any ideas on how to fix?

  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Nothing in apache error log and in EspoCRM data/logs?

    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • rtulsiani
      Junior Member
      • Dec 2015
      • 8

      #3
      nothing in apache error log. when installing espocrm, requirements check passed (no errors). how do i check espocrm data/logs?
      Last edited by rtulsiani; 12-11-2015, 02:25 AM.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        in espocrm root directory data/logs/ folder
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • rtulsiani
          Junior Member
          • Dec 2015
          • 8

          #5
          here is the log:

          [2015-12-09 00:57:59] Espo.WARNING: E_WARNING: include(data/config.php): failed to open stream: No such file or directory {"file":"/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/application/Espo/Core/Utils/Config.php","line":159} []
          [2015-12-09 00:57:59] Espo.WARNING: E_WARNING: include(): Failed opening 'data/config.php' for inclusion (include_path='/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/phpunit/php-token-stream:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/phpunit/php-text-template:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/phpunit/phpunit-mock-objects:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/phpunit/php-timer:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/phpunit/php-code-coverage:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/phpunit/phpunit:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/vendor/symfony/yaml:/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo') {"file":"/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/application/Espo/Core/Utils/Config.php","line":159} []
          [2015-12-09 00:58:31] Espo.WARNING: E_WARNING: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known {"file":"/hermes/bosoraweb126/b1215/nf.trainingedgeca/mcekb/espo/install/core/SystemHelper.php","line":205} []

          Comment

          • rtulsiani
            Junior Member
            • Dec 2015
            • 8

            #6
            any help would be greatly appreciated.

            Comment

            • rtulsiani
              Junior Member
              • Dec 2015
              • 8

              #7
              note: i sent the error messages to my host tech support and this their response:

              The error message that you've provided states that the directory/file 'data/config.php' is missing. So, it shows message as 'No such file or directory'. However, I could find the directory/file 'data/config.php' in your account. Also, MySQL PDO connection is not working as of now with the PHP version 5.5 and 5.6 that we provide. So, I have tried setting the PHP verson 5.3 for your account and resetting the file permissions but the error persists at http://mcekb.com/espo/ . It appears to be an issue with the web application that you're using. I would suggest you to contact web application vendor or refer their support forums for any fixes/workarounds available.

              Comment

              • yuri
                Member
                • Mar 2014
                • 8440

                #8
                include_path is weird in the error message

                We never encountered with such a problem. Did you run phpunit? You should not do, just asking. Try to ask your hosting provider why script looks to espo/vendor/phpunit/... directory
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                • rtulsiani
                  Junior Member
                  • Dec 2015
                  • 8

                  #9
                  I contacted the host support and they recommended making changes to the path in the config.php file (see below), so i've done that, but that didn't fix the issue.

                  Here is what they asked me to do:

                  Error is occuring due to the incorrect path. In Espo/Core/Utils/Config.php I could see below path

                  private $defaultConfigPath = 'application/Espo/Core/defaults/config.php';

                  private $systemConfigPath = 'application/Espo/Core/defaults/systemConfig.php';

                  protected $configPath = 'data/config.php';

                  Could you please change the path as below as check the website functionality from your end.

                  private $defaultConfigPath = '/home/users/web/b1215/nf.trainingedgeca/mcekb/espo/application/Espo/Core/defaults/config.php';

                  private $systemConfigPath = '/home/users/web/b1215/nf.trainingedgeca/mcekb/espo/application/Espo/Core/defaults/systemConfig.php';

                  protected $configPath = '/home/users/web/b1215/nf.trainingedgeca/mcekb/espo/data/config.php';

                  Also, website at http://mcekb.com/espo/ is not showing this error. If the issue still persists with the include path then provide us the exact location where the error is showing for the include path so that we can assist you further.

                  Comment

                  • rtulsiani
                    Junior Member
                    • Dec 2015
                    • 8

                    #10
                    I showed the hosting company a screenshot of the server response error message and here is what they said (anyone know how to fix?):

                    I've searched for the existence of the code in the website. Upon investigating, I noticed the code in the following file:
                    client/src/app.js

                    Upon going through the codes, I could see the following codes in line 478:

                    case 200:
                    Espo.Ui.error(self.language.translate('Bad server response'));
                    console.error('Bad server response: ' + xhr.responseText);
                    break;

                    This issue is purely related to the script. As we are hosting service, its out of our scope to assist you further on the issues related to the script.

                    Comment

                    • tarasm
                      Super Moderator
                      • Mar 2014
                      • 573

                      #11
                      I think, you have problem with the permission. Please set 775 for "/data" directory.
                      Job Offers and Requests

                      Comment

                      • rtulsiani
                        Junior Member
                        • Dec 2015
                        • 8

                        #12
                        it was previously set to 755, i changed it to 775. cleared the cache and still got the same server error message.

                        Comment

                        • tarasm
                          Super Moderator
                          • Mar 2014
                          • 573

                          #13
                          Did you make it recursively?
                          If yes and the problem is still appear, then check the current directory path for EspoCRM. Please add this code to application/Espo/Core/Utils/Config.php, line 194:
                          PHP Code:
                          if (isset($GLOBALS['log'])) {
                                      $GLOBALS['log']->error('Current Directory: ' . getcwd());
                                  } 
                          
                          So, the final code should look like:
                          PHP Code:
                          protected function loadConfig($reload = false)
                              {
                                  if (isset($GLOBALS['log'])) {
                                      $GLOBALS['log']->error('Current Directory: ' . getcwd());
                                  }
                          
                                  if (!$reload && isset($this->data) && !empty($this->data)) {
                                      return $this->data;
                                  }
                          
                                  ......
                              } 
                          
                          Job Offers and Requests

                          Comment

                          Working...