Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token not found - Possible fix #146

Open
yanosuke opened this issue Jan 6, 2019 · 1 comment
Open

Token not found - Possible fix #146

yanosuke opened this issue Jan 6, 2019 · 1 comment

Comments

@yanosuke
Copy link

yanosuke commented Jan 6, 2019

This is more of a future note to myself, as well as a possible fix to someone else.

No matter what I tried, including messing around with the .htaccess file, I was not able to resolve the "Token not found" error. Finally, I enabled PHP-FPM for PHP7.1 and everything was working.
Not 100% if this alone fixed the problem, but it certainly made it work for me.

@dakujem
Copy link
Contributor

dakujem commented Jul 1, 2019

When you are using Fast CGI with Apache, more precisely mod_fcgid, the default configuration will "eat away" your Authorization header before it even reaches your PHP.

You need to set the CGIPassAuth option in you vhost config (read here).

Example:

<VirtualHost *:80>
    DocumentRoot "R:/foo"
    <Directory "R:/foo">
        AddHandler fcgid-script .php
        Options +ExecCGI
        FCGIWrapper "R:/dev/php73/php-cgi.exe -c R:/php/php73/php.ini" .php
        CGIPassAuth on
    </directory>
</VirtualHost>

This will enable your HTTP Authorization headers to reach your PHP interpreter.

Hope this helps.

P.S. Even thoug this reply is related to Apache, there may be a similar option for other servers.

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

No branches or pull requests

2 participants