[PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-02 Thread oli . laurel
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



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



Aw: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-02 Thread oli . laurel
 Hi,

well i open at the same time 6 *.cmd scripts with the following command:
"C:\Program Files (x86)\GnuWin32\bin\wget.exe" http://127.0.0.1/index_list.php

(how do i open there 6 scripts: mark the 6 scripts than shift + right klick --> 
open)

again error 500... here ist the logfile:

#Software: Microsoft Internet Information Services 8.0
#Version: 1.0
#Date: 2013-08-02 16:42:46
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username 
c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status 
time-taken
2013-08-02 16:42:46 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 200 0 0 312
2013-08-02 16:42:46 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 200 0 0 343
2013-08-02 16:42:46 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 200 0 0 343
2013-08-02 16:42:46 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 200 0 0 343
2013-08-02 16:42:46 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 500 0 64 421
2013-08-02 16:42:46 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 200 0 0 390
2013-08-02 16:42:47 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 500 0 64 15
2013-08-02 16:42:49 127.0.0.1 GET /index_list.php - 80 - 127.0.0.1 Wget/1.11.4 
- 500 0 995 15

movie.mpg has 6mb

thx for help



- Original Nachricht 
Von: oli.lau...@arcor.de
An:  php-windows@lists.php.net
Datum:   02.08.2013 18:20
Betreff: [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
> 
>  $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
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Aw: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-02 Thread oli . laurel
 Sorry i forgot to answer your question:
no difference between 

header('Content-Disposition: attachment; filename="movie.mpg"');
and
header('Content-Disposition: inline; filename="movie.mpg"');

thx + regards
oli


- Original Nachricht 
Von: Jacob Kruger 
An:  php-windows@lists.php.net
Datum:   02.08.2013 20:04
Betreff: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, 
php 5.5.1

> 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: 
> To: 
> 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
> >
> >  > $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
> >
> > 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Aw: RE: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-03 Thread oli . laurel
Hi Eric,
thx for reply. You are right. With your perl script i also can not reproduce 
Status 500.
All downloaded request in log have status 200.

But if i do

[cmd.exe]
for /L %i in (0,1,10) do start wget.cmd %i

[wget.cmd start]
"C:\Program Files (x86)\GnuWin32\bin\wget.exe" http://127.0.0.1/index.php

i get again status 500 again.
sometime all request also have 200 but three times later i will get again 
status 500 in half of requests.

thx + regards
oli



- Original Nachricht 
Von: Eric Stenson 
An:  "oli.lau...@arcor.de" , "ja...@blindza.co.za" 
, "php-windows@lists.php.net" 
Datum:   02.08.2013 22:51
Betreff: RE: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows
 server 2012, php 5.5.1

> I'm unable to repro on a VM with PHP 5.5.1.
> 
> From systeminfo, the VM is running Server 2012 Datacenter
> 
> OS Name:   Microsoft Windows Server 2012 Datacenter
> OS Version:6.2.9293 N/A Build 9293
> 
> I wrote a quick perl script and started 10 instances in parallel.  All 10
> instances succeeded with 200 OK and the .mpg was fetched.  
> 
> Does this only repro when the GET is done on localhost?
> 
> Thx!
>   --E.
> 
> [getmovie.pl]
> 
> use strict;
> use warnings;
> 
> use LWP::Simple;
> 
> my $suffix = '1';
> 
> if (defined $ARGV[0]) {
> $suffix = $ARGV[0];
> }
> my $filename_out = "c:\\temp\\xx${suffix}.mpg";
> 
> my $url = 'http://localhost/movie_test.php';
> my $browser = LWP::UserAgent->new;
> my $response = $browser->get($url, ':content_file' => $filename_out);
> die "Couldn get url ($url)\n", $response->status_line, "\n Aborting"
>  unless $response->is_success;
> print "Got $url";
> 
> [end getmovie.pl]
> 
> [test cmd line]
> 
> for /L %i in (0,1,10) do start perl.exe getmovie.pl %i
> 
> -Original Message-
> From: oli.lau...@arcor.de [mailto:oli.lau...@arcor.de] 
> Sent: Friday, August 02, 2013 11:48 AM
> To: ja...@blindza.co.za; php-windows@lists.php.net
> Subject: Aw: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows
> server 2012, php 5.5.1
> 
>  Sorry i forgot to answer your question:
> no difference between 
> 
> header('Content-Disposition: attachment; filename="movie.mpg"'); and
> header('Content-Disposition: inline; filename="movie.mpg"');
> 
> thx + regards
> oli
> 
> 
> - Original Nachricht 
> Von: Jacob Kruger 
> An:  php-windows@lists.php.net
> Datum:   02.08.2013 20:04
> Betreff: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server
> 2012, php 5.5.1
> 
> > 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: 
> > To: 
> > 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
> > >
> > >  > > $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
> > >
> > > 
> > 
> > 
> > --
> > PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: 
> > http://www.php.net/unsub.php
> > 
> > 
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
> 
> 
> 
> 
> 
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Aw: Re: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-03 Thread oli . laurel
Hi Jacob,
with your php script all requests are 200.

header('Content-Disposition: inline; filename="movie.mpg"');
header('Content-Disposition: attachment; filename="movie.mpg"');

Thx + Regards
Oli



- Original Nachricht 
Von: Jacob Kruger 
An:  php-windows@lists.php.net
Datum:   03.08.2013 00:11
Betreff: Re: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 
2012, php 5.5.1

> And, what if you try reading the file's contents into a variable, and then 
> echo that to the output buffer:
> 
>  $track = "movie.mpg";
> header("Content-Type: audio/mpeg");
> header('Content-Length: ' . filesize($track));
> header('Content-Disposition: inline; filename="movie.mpg"');
> //could also, again, try attachment here
> 
> $file = fopen($track, "rb"); // end b character implements binary mode
> $data = fread($file);
> fclose($file);
> echo $data;
> exit;
> ?>
> 
> Just asking since that might give you more detail about what's causing the 
> error to happen, depending on whether the fopen. fread, etc. then trigger an
> 
> error, and, haven't bothered double checking actual file name, etc. - just 
> used a form of example name - and, also didn't double check code above - 
> sorry...
> 
> Also, you should make sure there's no HTML markup being echoed/output before
> 
> this code executes, since think it might interfere with then 'clean' output
> 
> of file contents.
> 
> Stay well
> 
> Jacob Kruger
> Blind Biker
> Skype: BlindZA
> '...fate had broken his body, but not his spirit...'
> 
> - Original Message - 
> From: 
> To: ; 
> Sent: Friday, August 02, 2013 8:48 PM
> Subject: Aw: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows 
> server 2012, php 5.5.1
> 
> 
> > Sorry i forgot to answer your question:
> > no difference between
> >
> > header('Content-Disposition: attachment; filename="movie.mpg"');
> > and
> > header('Content-Disposition: inline; filename="movie.mpg"');
> >
> > thx + regards
> > oli
> >
> >
> > - Original Nachricht 
> > Von: Jacob Kruger 
> > An:  php-windows@lists.php.net
> > Datum:   02.08.2013 20:04
> > Betreff: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server
> 
> > 2012, php 5.5.1
> >
> >> 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: 
> >> To: 
> >> 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
> >> >
> >> >  >> > $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
> >> >
> >> >
> >>
> >>
> >> -- 
> >> PHP Windows Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> > 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Aw: Aw: Re: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-09 Thread oli . laurel
Hi,
it seems to be a problem with readfile() when file is downloaded in parts (as 
steam).
If i remove "--limit-rate=20k" of wget all requests are 200.

How can i solve this problem?

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Aw: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-12 Thread oli . laurel
 Hi List,
today i started to generate a backtrace "Memory and Handle Leak" as described 
here:
https://bugs.php.net/bugs-generating-backtrace-win32.php
Does this help to analyse the problem?

Thread 6 - System ID 3884
Entry point   w3tp+2040 
Create time   12.08.2013 14:08:38 
Time spent in user mode   0 Days 0:0:0.0 
Time spent in kernel mode   0 Days 0:0:0.0 

Full Call Stack

Function Arg 1 Arg 2 Arg 3 Arg 4   Source 
ntdll!NtTerminateProcess `03212eb0 `02a7a800 
`0001 `
KERNELBASE!TerminateProcess+2f `00ff6ae0 `778f598e 
`01c869f0 `
iisfcgi+94da `00ff3410 `00fe0cf0 `800703e3  
   `778c8884
iisfcgi+68aa `00ff3410 `0010 `0045d6b0  
   `004637e0
iisfcgi+556f ` `800703e3 `027e12f8  
   07fe`f5db6585
iisfcgi+105f6 ` `0002 `00fe0cf0 
`
iiscore+ba3c `019d46c8 ` `  
   `778ac1e0
iiscore+46a4 `779a4440 `019d46c0 `019d46c8  
   `0001
iiscore+a775 ` `02753a30 `0008  
   `02753c28
iiscore+5a03 `019d46c0 `0002 `019d46c0  
   `
iiscore+1741 `005134d0 ` `  
   07fe`f70c1107
w3dt!UlAtqGetContextProperty+a2 `005134d0 ` 
07fe`faeb `
w3dt!UlAtqGetContextProperty+8c ` 07fe`fde3379b 
` `
w3tp+1fba `0002 `019d3aa8 07fe`faa31080 
`
w3tp+2024 ` `004be870 `004be870 
07fe`faeb
w3tp+20a1 ` ` ` 
`
kernel32!BaseThreadInitThunk+d ` ` 
` `
ntdll!RtlUserThreadStart+21 ` ` 
` `

Exception Information
In 
w3wp__DefaultAppPool__PID__3596__Date__08_12_2013__Time_02_09_39PM__703__ntdll!ZwTerminateProcess.dmp
 the assembly instruction at ntdll!DbgBreakPoint in 
C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused a 
breakpoint exception (0x8003) on thread 6

Module Information 
Image Name: C:\Windows\System32\ntdll.dll   Symbol Type:  Export 
Base address: 0x0003`00905a4d   Time Stamp:  Thu Nov 17 07:32:46 2011  
Checksum: 0x`   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  NT Layer DLL 
ISAPIFilter: False   File Version:  6.1.7601.17725 (win7sp1_gdr.16-1503) 
Managed DLL: False   Internal Name:  ntdll.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights reserved. 
Loaded Image Name:  ntdll.dll   Legal Trademarks:   
Mapped Image Name: Original filename:  ntdll.dll 
Module name:  ntdll   Private Build:   
Single Threaded:  False   Product Name:  Microsoft® Windows® Operating System 
Module Size:  1,66 MBytes   Product Version:  6.1.7601.17725 
Symbol File Name:  ntdll.dll   Special Build:  & 


5.5.1 x86 + Windows 2008 R2 SP1

Regards
Oli


- Original Nachricht 
Von: Jacob Kruger 
An:  php-windows@lists.php.net
Datum:   02.08.2013 20:04
Betreff: Re: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, 
php 5.5.1

> 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: 
> To: 
> 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
> >
> >  > $track = "movie.mpg";
> > if (file_exists($track)) {
> >header("Content-Type: audio/mpeg");
> >header('Content-Length: ' . filesize($track));
> >header('Content-Disposition: inline; filename="movie.mpg"');
> >heade

Aw: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 5.5.1

2013-08-15 Thread oli . laurel
Hi List,
I opend a bug report.
Hope this helps to find the problem.

https://bugs.php.net/bug.php?id=65453

Regards 


- Original Nachricht 
Von: sniukbp sniukbp 
An:  php-windows@lists.php.net
Datum:   14.08.2013 21:58
Betreff: [PHP-WIN] Readfile() + mpg = http status 500, windows server 2012, php 
5.5.1

> Good morning,
> I run into same trouble.
> 
> Kind regards
> 
> 
> 
> 
> 
> hi oli,
> i can confirm this if i use following command.
> one download one 500
> 
> [download.cmd]
> "C:\Program Files (x86)\GnuWin32\bin\wget.exe" --limit-rate=4
> http://127.0.0.1/index.php
> 
> did you find any solution?
> 
> regards
> 
> 
> 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
> 
>  $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