ID: 37135 User updated by: nbari at mac dot com Reported By: nbari at mac dot com Status: Bogus Bug Type: *General Issues Operating System: Mac OS X version 10.4.6 PHP Version: 5.1.2 New Comment:
making some tests, notice that the code works on php 4 but the problem only seems to happend on php 5.1.2. i used the following code for testing: <?php $file = 'file.wma'; $tono = 'tono.wma'; $content_length = filesize($file); header("Content-Type: audio/x-ms-wma"); header('Content-Length: '.$content_length); header('Content-Disposition: filename="'.$tono.'"'); readfile($file); ?> Previous Comments: ------------------------------------------------------------------------ [2006-04-19 10:43:36] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2006-04-19 10:39:30] nbari at mac dot com Description: ------------ a leading slash must be used on the mime_tye to get Content- Type to work: header("Content-Type: audio/x-ms-wma"); do not work header("Content-Type: /audio/x-ms-wma"); it works Reproduce code: --------------- <?php header("Content-Type: audio/x-ms-wma"); header("Content-Disposition: filename=\"file.wma\""); readfile("/Volumes/RamDisk/file.wma"); ?> if audio/x-ms-wma is replaced with /audio/x-ms-wma so it looks like : header("Content-Type: /audio/x-ms-wma"); the code works. with out the leading / the code do not work. Expected result: ---------------- the windows media player to open the wma file or the option for saving the file. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37135&edit=1