+ Reply to Thread
Results 1 to 6 of 6

Thread: 502 Bad Gateway

  1. Join Date
    Jul 2006
    Posts
    3

    502 Bad Gateway

    Hey,

    I have the latest EP-Dev.

    I go to: http://www.com/whois/admin/

    When i try to login i get this error:

    Bad Gateway
    Web server received an invalid response while acting as a gateway or proxy server.

    Im using windows 2003 with plesk cp

  2. Join Date
    Aug 2004
    Posts
    781

    Re: 502 Bad Gateway

    That is an error that is likely related to specific webserver configuration. Do any PHP scripts work?

    I would suggest contacting your host.

    The script works fine and has been tested specifically with Windows 2003 + Plesk as well.

  3. Join Date
    Jul 2006
    Posts
    3

    Re: 502 Bad Gateway

    Thanks for the reply.

    All other Scritps works just fine, whois.php works to.

    But logging in does not work.It generates this error.

    what changes must be done with the php settings ?

    Looks like a problem with the settings/script:
    http://forum.swsoft.com/showthread.p...hlight=gateway

  4. Join Date
    Aug 2004
    Posts
    781

    Re: 502 Bad Gateway

    The script uses fopen to connect to whois servers.

    As far as sript itself goes, the script uses fopen to open up files and folders for various caching, etc. When you first visit the admin panel, the script will report if it has access to particular files (if it does not, it will tell you that you must fix them).

    The script, by default, does a quick check when you first login for updates from ep-dev.com (that way the script notifies you of new updates when they are available immediately). This process uses fopen to access a foreign URL (ep-dev.com) and it is likely that allow_url_fopen needs to be enabled in the server's php.ini file, which is only accessible with administrator access.

    If you do not have administrative access to the server then it is a toss up if the host will enable allow_url_fopen for you, as it does have some security implications.

    The alternative is to:
    1. Disable update check manually (in config/config.php file change $this->ADMIN['update_check'] = true; to false
    2. Edit classes/engine.php file and modify fetchWhoisData($address, $port, $timeout, $request, &$data) function to use curl instead. This will definitely require some PHP knowledge. I will see if I can get it into the next version, but you will need to rely on basic PHP variable tutorials as well as cURL tutorials until then to write your own code.

  5. Join Date
    Jul 2006
    Posts
    3

    Re: 502 Bad Gateway

    Okay,

    The problem is CheckUpdate() function.Cause when i changed the config.php file $this->ADMIN['update_check'] = true; to false;

    It works )

    I checked the php.ini file.
    allow_url_fopen = On


  6. Join Date
    Aug 2004
    Posts
    781

    Re: 502 Bad Gateway

    Believe it or not we encountered the same problem on a client server.

    It is actually a bug in PHP 4.4.2 (http://bugs.php.net/bug.php?id=36017 and scroll down a bit). We got around the bug by upgrading PHP to a CVS version (the bug broke many other scripts on the server of course, so we had to upgrade).

    There is a post about it in the user comments on fopen() function page: http://www.php.net/manual/en/function.fopen.php#66343

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts