Re: Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

From: Date: Fri, 02 Aug 2013 18:04:49 +0000
Subject: Re: Readfile() + mpg = http status 500, windows server 2012, php 5.5.1
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-31089@lists.php.net to get a copy of this message
And, if you change Content-Disposition to something like?: header('Content-Disposition: attachment; filename="movie.mpg"'); Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ----- Original Message ----- From: <oli.laurel@arcor.de> To: <php-windows@lists.php.net> Sent: Friday, August 02, 2013 6:20 PM Subject: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1
Hi List, i installed a blank Windows Server 2012 Standard, added Role IIS & Feature CGI extracted 5.5.1 VC11 x86 Non Thread Safe to c:\Program Files (x86)\php installed vcredist_x86.exe added Handler Mappings in IIS Request path: *.php Module: FastCgiModule Executable: c:\Program Files (x86)\php\php-cgi.exe Name: PHP via FastCgi Added 2 files to C:\inetpub\wwwroot index.php & movie.mpg (6MB) Content of index.php <?php $track = "movie.mpg"; if (file_exists($track)) { header("Content-Type: audio/mpeg"); header('Content-Length: ' . filesize($track)); header('Content-Disposition: inline; filename="movie.mpg"'); header('X-Pad: avoid browser bug'); header('Cache-Control: no-cache'); readfile($track); exit; } else { header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); echo "no file"; } ?> Now every time the index.php is requested i get an error 500 in Webserver log. But file will be delivered sucessfully. Is there a problem with mpg files and readfile(); No difference with 5.4.17, 5.3.27 & Windows Server 2008 R2. I know its very basic, but expected result should be: HTTP-Status: 200 or? phpinfo() will be delivered succesful. Thx + regards oli -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.windows (#31089) next »