Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Certainly not an expert, but I know my way around quite well, maybe I can help.
What's your issue? -
@kolaente I finally managed to get the general config working so I can reach the api endpoints now but although I'm getting http status codes from php, not getting any other data from it, all responses are empty and I'm very sure that content/data is being generated.
-
fonfi8236y@linuxxx are you reading response with PHP? Be sure to use php://input, something like: $data = json_decode( file_get_contents( 'php://input' ), true );
-
@fonfi Oh no as in the output isn't coming out, the response is empty except for the http status.
-
vane112846yadd / check access log / error log
curl -v the url
if you have the fastcgi google is your friend
https://serverfault.com/questions/... -
@linuxxx Are you using fastcgi? Via port or socket? Is it running? Is it properly configured to listen on the same way nginx calls it?
Also, is your nginx config able to serve simple static files? If not, maybe something is wrong with the nginx config itself. -
mpie2346yReally need more info here.
How does your vhost look like?
php-fpm or not? Reverse proxy or not? What’s the project root that you expect?
What’s the status code? Any cors header errors?
Only access log is showing traffic? -
@kolaente
- Using php fpm
- via socket
- yeah its running
- Not entirely sure what you mean but I'm very sure that its passing stuff correctly since I'm getting correct http status codes from php.
- yes, its running 20+ websites and they all work well with php.
@mpie
- I can't just share that too badly
- php fpm
- no reverse proxy
- what do you mean?
- status code depends on what I'm requesting but I'm getting the right status code every time (this can vary and I know from tests that I'm getting the correct ones)
- no cors errors
- yes, access log is showing requests. -
@linuxxx Does it work when you put another PHP file in the exact location you want to access with just a "phpinfo();"?
-
@linuxxx how are you forwarding your requests to php? Are you sure those response code are from php or just nginx telling you what happened with it?
-
After tons of debugging I discovered that curl is showing response and my browsers show it as well but ONLY if I echo something before the response (a number or whatever).
I have no clue why. -
@linuxxx you're a celebrity here man
linuxxx: can someone help me with something?
people: YES AND HERE'S 20 UPVOTES!
it's heartwarming
Related Rants
Any NGINX experts here? I'm completely stuck, just can't figure this one out.
Config stuff.
question
help