rafinhacarneiro/appgini-api

Nonexistent/Inexistent table

Closed this issue · 3 comments

using v2 of the API with postman
/api/v2/index.php?tb=Accounts

Returns the same for any db table

{
    "report": {
        "error": {
            "table-failed": "Nonexistent table"
        }
    },
    "meta": {
        "ip": "71.28.181.154",
        "timestamp": "2020-09-26 12:29:28"
    }
}

I also have AppGini installed in a folder off the root in a folder called "demo"
in the index.php for v2 on line 27 I added an extra ../ to the lib path and it all works and authenticates in postman, but always tells me "Nonexistent table" in the body

  • is there a bug?
  • because I have this in a folder called demo?
  • something wrong with how I configured postman?

Even v3 produces a similar error (Inexistent vs Nonexistent)
and also changed api-config.php path to add an extra ../ on line 20

{
    "report": {
        "error": "Inexistent table.",
        "type": "table-failed"
    },
    "meta": {
        "remote-ip": "71.28.181.154",
        "timestamp": 1601138260
    }
}

I just reconfigured a new website as a subdomain so the URL is no longer www.mysite.com/demo where demo is my AppGini folder. The URL is now demo.mysite.com and AppGini is in the ROOT of this site.

I am still having to add the ../ as I get 500 errors when trying to run this by putting the API folder in the root, like this... demo.mysite.com/api.

failed to open stream: No such file or directory in /home/mysite/domains/demo.mysite.com/public_html/api/v3/api-config.php on line 20

where public_html is my ROOT folder. if this were not a subdomain it would look like this /home/mysite/public_html/api/v3/api-config.php

anyways same Nonexistent/Inexistent table error after adding ../ to make the 500 error disappear.

The inexistent table error was corrected with the normalization of the data. The API was comparing the same table names but with different captalizations, thus returning a false error

Resolved