- Code: Select all
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
However, whenever I do this I get the following error in Apache's PHP error log file:
(20024)The given path is misformatted or contained invalid characters: [client 127.0.0.1:61626] AH00127: Cannot map POST [name removed]/%3C?php%20echo%20htmlspecialchars($_SERVER[%27PHP_SELF%27]);?%3E HTTP/1.1 to file, referer: http://127.0.0.1/[name removed]/admin.php
I have read online that the error comes from the %3C code which represents the '<' character and that because this character is used in Windows filesystem paths, Apache is blocking it. My question to y'all is if there is a known workaround to this problem?