Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Use of flush() function prevents modification of header #29

Open
benjaminas opened this issue Apr 9, 2020 · 1 comment
Open

Use of flush() function prevents modification of header #29

benjaminas opened this issue Apr 9, 2020 · 1 comment

Comments

@benjaminas
Copy link

Function function _make_curl_handle($query, $timeout=null) calls function
flush();
This function modifies headers.
And then it is not possible to modify headers (redirect pages etc) in main php code that uses Yubico library.
After validzteing the password I get PHP Warning: Cannot modify header information - headers already sent in /home/benjaminas/new.velsiga.lt/htdocs/login.php on line .
I have traced the problem and that was fush() function.
After commenting this function everything works fine. Authentications works fine and I'm able to modify headers in my main program.

Why does this function needs to flush all the buffer before calling curl?

@shijij
Copy link

shijij commented Aug 2, 2020

same issue here.
the flush() broke my login redirection as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants
@shijij @benjaminas and others