Package: php7.4-cgi
Version: 7.4.33-1+deb11u3

The $_SERVER['REQUEST_URI'] variable differs between Apache version 2.4.56 and earlier versions of Apache. When viewed on Apache 2.4.56 the variable contains the full URL including protocol of the request target, e.g. https://www.example.com/path/to/resource. On earlier versions of Apache, the variable would contain /path/to/resource.

Steps to replicate:

Install apache2, php7.4-cgi and enable Apache proxy_fcgi
Add info.php to /var/www/html with the contents <?php phpinfo();
Browse to http://{server}/info.php

Expected behaviour

$_SERVER['REQUEST_URL'] contains /info.php

Actual behaviour

$_SERVER['REQUEST_URL'] contains http://{server}/info.php



CONFIDENTIALITY NOTICE: This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email, use it for any purpose nor disclose its contents to any
other person. GENERAL STATEMENT: Any statements made, or intentions expressed, within this communication may
not necessarily reflect the views of the Company. Be advised that no content
herein may be held binding upon the Company or any associated company unless
confirmed by the issuance of a formal contractual document or Purchase
Order. Registered Office: 38 Anson Road Martlesham Heath Ipswich Suffolk IP5 3RG Company Registration: 4426731 VAT: GB 834 5358 17

Reply via email to