---
title: "Discussion on \"apache+php 无法获取 header 的Authorization数据\" | Hashnode"
description: "Discussion on \"apache+php 无法获取 header 的Authorization数据\". 原因和解决办法\n换了新的电脑，装了最新版的 MAMP ，一切都是非常新，出现了一个诡异的 bug：`$_SERVER['HTTP_AUTHORIZATION']` 竟然只有这个Authorization无法获取到参数。\n环境：Apache ,**采用 fastcgi 模式**，php 7.4。\n结论是：没有开启CGIPassAuth on。修改 httpd.conf\n<IfModule mod_fastcgi.c>\n    <Directory \"/Applications/MAMP/fcgi-..."
url: "https://hashnode.com/posts/apachephp-header-authorization/6759c1269f072b30420abd28"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [apache+php 无法获取 header 的Authorization数据](https://blog.jayinton.com/apachephp-header-authorization?utm_source=hashnode&utm_medium=feed)

原因和解决办法 换了新的电脑，装了最新版的 MAMP ，一切都是非常新，出现了一个诡异的 bug：\`$\_SERVER\['HTTP\_AUTHORIZATION'\]\` 竟然只有这个Authorization无法获取到参数。 环境：Apache ,\*\*采用 fastcgi 模式\*\*，php 7.4。 结论是：没有开启CGIPassAuth on。修改 httpd.conf <IfModule mod\_fastcgi.c> <Directory "/Applications/MAMP/fcgi-...

Dec 11, 2024 · 1 min read · blog.jayinton.com  
Read the article

-   [#apache](https://hashnode.com/tag/apache)
-   [#php](https://hashnode.com/tag/php)

## Written by

[Jayin Taung](https://hashnode.com/@jayin)

@jayin · Guangzhou,China

  
[View profile](https://hashnode.com/@jayin)

拥抱变化，持续输出

PHPer,Creator of ZTBCMS

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
