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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <ericsten@xxxxxxxxxxxxx>
An:      "oli.laurel@xxxxxxxx" <oli.laurel@xxxxxxxx>, "jacob@xxxxxxxxxxxxx" <jacob@xxxxxxxxxxxxx>, "php-windows@xxxxxxxxxxxxx" <php-windows@xxxxxxxxxxxxx>
Datum:   02.08.2013 22:51
Betreff: RE: Re:  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.laurel@xxxxxxxx [mailto:oli.laurel@xxxxxxxx] 
> Sent: Friday, August 02, 2013 11:48 AM
> To: jacob@xxxxxxxxxxxxx; php-windows@xxxxxxxxxxxxx
> Subject: Aw: Re:  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 <jacob@xxxxxxxxxxxxx>
> An:      php-windows@xxxxxxxxxxxxx
> Datum:   02.08.2013 20:04
> Betreff: Re:  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: <oli.laurel@xxxxxxxx>
> > To: <php-windows@xxxxxxxxxxxxx>
> > Sent: Friday, August 02, 2013 6:20 PM
> > Subject:  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
> > >
> > > 
> > 
> > 
> > --
> > 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





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux