m6w6 / ext-http

Extended HTTP Support
BSD 2-Clause "Simplified" License
79 stars 22 forks source link

Windows; extension loaded but offers no functions? #128

Closed kimboslice99 closed 1 year ago

kimboslice99 commented 1 year ago

System info:

Seems even after loading the extension, and it appearing under phpinfo() and php -m, none of the functions appear with print_r(get_extension_funcs("http"))

The dependencies are present... raphf, iconv, and hash are all loaded before php_http.dll

Unsure what to do? No errors present anywhere

m6w6 commented 1 year ago

This extension does not provide any plain functions, see its documentation.

kimboslice99 commented 1 year ago

Thanks for the response, ya I have read through that and didn't make much of any progress, ah well, suppose I'll come back to this when I've learned more

m6w6 commented 1 year ago

Depending on what you want to do, have a start with - some - examples, I guess.

kimboslice99 commented 1 year ago

Suppose I may have been reading old docs or something that had pointed me to this extension for a few functions to serve files, like http_send_file, but it would seem this is moved to the http\Env\Response class

However I see its noted

If you need throttling by regular means, check for other options in your stack, because this method blocks the executing process/thread until the response has completely been sent.

So I guess this isn't really a great solution for serving large files?

Edit; I've seen the first example, couldnt seem to make it work as written because STDOUT isnt defined, and even after defining like so define('STDOUT', fopen('php://stdout', 'wb')); it still fails to send any response yet no errors

m6w6 commented 1 year ago

Just don't use STDOUT at all, when you're not on the CLI.