GTU-Student-Attendance-System
GTU-Student-Attendance-System copied to clipboard
Zend Http Module - ClientStatic http request not working in Openshift Demo Server
- Login and open any master in "Search & Update" view.
- Double click any row to edit it.
- Page is not working.
Note: Problem does not happen in local server.
I tried to test your application using docker and I got the same error. The error is related to your api rest consumption.
When you consume the api rest of your application using ajax (jqyery), the http request is performed from user browser to the public domain of your application. However, when you consume the api rest from your backend, I mean with php, the http request is performed in background mode or from server to server. In this last case, you need the domain or localhost:port of the api rest. In your case, the api rest was developed with php and apache which uses 80 as port. This is the reason of the bug. Currently you are using this :
$view_url="http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}".APP_NAME."/core/modules/view/get/";
$_SERVER['SERVER_PORT'] returns 8080 if you are in localhost or in a "not complicated" or "default host"
But in case of openshift or docker, $_SERVER['SERVER_PORT'] return other port due to port binding (docker) or dynamic domains approach.
FIX
Use a 80 as port for internal http requests. 80 is due to apache default port:
config.php
define('APP_INTERNAL_PORT', '80');
MyHttpRequest.class.php
$view_url="http://{$_SERVER['SERVER_NAME']}:".APP_INTERNAL_PORT.APP_NAME."/core/modules/view/get/";