Hi,

Right know, i'm working on project which require services for my mobile development where i use drupalgap as a platform. From my local environment, service endpoint can communicate and success send data between portal and mobile. The problem coming when i migrate my portal to development server where i use red hat. The error show in console Failed to load resource: the server responded with a status of 404 (Not found : Could not find resource 2.) when i wanna check service endpoint. I already try change folder owner and permission folder to (777 and 755) but the problem still persist. Is there any solution for this.

Red Hat Server specs:

  • OS : Red Hat Enterprise Linux
  • Apache Version : Apache/2.4.6
  • PHP Version : PHP/5.6.24
  • Mysql : 5.5.47-MariaDB

Drupal

  • Drupal : Drupal 7.43
  • Services : 7.x-3.15
CommentFileSizeAuthor
#6 Screen Shot 2016-08-02 at 10.36.55 AM.png151.18 KBigenroot

Comments

igenroot created an issue. See original summary.

tyler.frankenstein’s picture

Status: Active » Postponed (maintainer needs more info)

Try starting out small and doing a GET on ?q=services/session/token to see if you can get a CSRF Token. I like FireFox Poster for this. Then try doing a POST to ?q=drupalgap/system/connect.json and sending along the value of the token with for the required X-CSRF-Token header. What happens then?

igenroot’s picture

Sorry for the late reply due to limited access to server.
For GET on ?q=services/session/token Firefox Poster give output
HYy_oaldH3gOPWyFKgJnKu5J_VCa91l8Jye7tfH_9q0

while POST to ?q=drupalgap/system/connect.json response

{"sessid":"okNt9kzVmFXqCJ7b0vjwF5co6b00DM9iTvLTA90Cg2s","session_name":"SESSc4658ad7dd5070665726946730d4a73a","user":{"uid":0,"hostname":"xx.16.124.xX","roles":{"1":"anonymous user"},"cache":0,"timestamp":1470020830},"remote_addr":"xx.16.124.xx","date_formats":{"short":{"Y-m-d H:i":{"type":"short","format":"Y-m-d H:i","locales":[],"locked":"1","is_new":false,"dfid":"1","language":null},"m/d/Y - H:i":{"type":"short","format":"m/d/Y - H:i","locales":["en-us"],"locked":"1","is_new":false,"dfid":"2","language":null},"d/m/Y - H:i":{"type":"short","format":"d/m/Y - H:i","locales":["en-gb","en-hk","en-ie","el-gr","es-es","fr-

tyler.frankenstein’s picture

That appears to be working fine. Now the question is, what is resource 2? What's the URL that you are trying to hit for that?

igenroot’s picture

StatusFileSize
new151.18 KB

Actually i wanna check my service endpoint status. I put ?q=drupalgap. From this issue also make my views for Json data document does not work and show ajax error.

This the screenshot for better understanding.

screenshot

igenroot’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Actually the problem from the mis-configuration of RedHat OS setting. I try re-install fresh RedHat OS and it working perfectly. Since I have found the solution, I'm closing this request. Thanks