Fix these SAPI hooks so that the TSRMLS parameters are correctly passed as required by the sapi struct

# Not sure if this builds either