Edit report at https://bugs.php.net/bug.php?id=60058&edit=1
ID: 60058 Comment by: david dot gero at ec dot gc dot ca Reported by: david dot gero at ec dot gc dot ca Summary: No way to upload long code samples in a bug report Status: Open Type: Bug Package: Website problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: You are wrong. Changing the extension to .txt has no effect. You get the following: Error: uploaded patch file must be text file (save as e.g. "patch.txt" or "package.diff") (detected "text/x-php") Could not attach patch "foo.txt" to Bug #12345 Try it for yourself. I'm betting you're using the "file" command, which does in fact say "text/x-php", no matter what the extension. Instead of checking for mime type of "text/plain" or "text/html" or whatever, why not just check if the first five chars are "text/", and that the extension is an allowable one like ".diff" or ".txt" or whatever? Previous Comments: ------------------------------------------------------------------------ [2011-10-13 20:52:22] paj...@php.net Yes, we should allow that and disable php execution :) In the meantime you can attach it as text, script.txt instead of .php. ------------------------------------------------------------------------ [2011-10-13 20:46:13] david dot gero at ec dot gc dot ca Description: ------------ The Description: section of the bug report screen says "upload patches and/or long code samples below", presumably in the Patch file: section with the "Browse" button. However, if you try to upload a .php file, it complains that the file is "text/x-php", which for some reason it doesn't consider to be text. Please fix it to allow "text/x-php" to be uploaded. The levels of authorization needed to create a publicly accessible URL on a government web site remove the possibility of "provide a URL to the source code that will reproduce the bug". ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60058&edit=1