View Full Version : 502 Bad Gateway
kebab
07-11-2006, 03:48 PM
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
Patrick
07-11-2006, 04:17 PM
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.
kebab
07-12-2006, 03:39 AM
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.php?s=4e0abda78223e98c3f99fb500669fa2c&threadid=34613&highlight=gateway
Patrick
07-12-2006, 03:12 PM
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 (http://www.php.net/manual/en/ref.filesystem.php#ini.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.
kebab
07-19-2006, 04:09 AM
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
Patrick
07-19-2006, 12:45 PM
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
Powered by vBulletin™ Version 4.0.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.