Unable to access file publicly
-
Hi.
This might be something trivial, but i'm unable to figure out why i'm not able to access/execute a.php
file, located in/app/data/public/
from outside?I have a file, say
abc.php
, that i wish to access like so:
GET my-domain/abc.php/test/1
.But, every time i try this, i get a
500 Error
. -
@girish said in Unable to access file publicly:
@shrey said in Unable to access file publicly:
PHP Fatal error: Uncaught Error: Class "Tqdev\PhpCrudApi\Config" not found in
The above is the error. There is no such class.
Indeed, there's some issue in the code of the
api.php
itself, which is the main cause.Thanks!
-
Are you able to access just
https://my-domain/abc.php
? Did you put some custom htaccess or apache configuration ? What is it saying in the logs? -
These are the files, in the
public
folder:
There is no
.htaccess
yet.I'm able to access
my-domain/index.html
&my-domain/a.txt
, but notmy-domain/api.php
.Error logs:
Nov 09 21:53:43[Thu Nov 09 16:23:43.458067 2023] [php:error] [pid 34] [client 122.180.29.153:43096] PHP Fatal error: Uncaught Error: Class "Tqdev\\PhpCrudApi\\Config" not found in /app/data/public/api.php:12740\nStack trace:\n#0 {main}\n thrown in /app/data/public/api.php on line 12740 Nov 09 21:53:43122.180.29.153 - - [09/Nov/2023:16:23:43 +0000] "GET /api.php HTTP/1.1" 500 - "-" "PostmanRuntime/7.34.0"
-
@shrey said in Unable to access file publicly:
PHP Fatal error: Uncaught Error: Class "Tqdev\PhpCrudApi\Config" not found in
The above is the error. There is no such class.
-
@girish said in Unable to access file publicly:
@shrey said in Unable to access file publicly:
PHP Fatal error: Uncaught Error: Class "Tqdev\PhpCrudApi\Config" not found in
The above is the error. There is no such class.
Indeed, there's some issue in the code of the
api.php
itself, which is the main cause.Thanks!
-