You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
| 2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
| 2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
| 2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
| 2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
| 2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
| 2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
| 2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
| 2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
(2) |
5
(5) |
6
(5) |
|
7
(5) |
8
(2) |
9
(5) |
10
(2) |
11
(2) |
12
(2) |
13
|
|
14
(5) |
15
(4) |
16
|
17
(2) |
18
(4) |
19
(2) |
20
(1) |
|
21
(1) |
22
|
23
|
24
|
25
(1) |
26
|
27
|
|
28
|
|
|
|
|
|
|
|
From: <php...@li...> - 2010-02-05 11:21:11
|
> So it should be added in the next release, and I'll just need to add the > 'Transfer-Encoding: Chunked' header. May be not. -- I just saw that your code doesn't use php://input, but opens a HTTP/1.0 URL connection to some resource. What resource is it? A local or a remote resource? If it is a resource served by the originating HTTP server or servlet engine, we've found the bug. If you want to include some local resource, use requestDispather.include() or the Apache API instead. A "loop-back" URL connection does not work, because the Apache process- and servlet thread pool is limited. If it runs out of resources, further requests might create a dead lock, they will block all further requests. Imagine a thread pool of 2, with two php scripts creating 2 additional requests to the same resource. These scripts will block the HTTP server or servlet engine forever. Regards, Jost Boekemeier |
|
From: <php...@li...> - 2010-02-05 09:23:31
|
FWIW, and for anyone else it might help, I'm trying a CURL approach instead:
$fp = fopen($temp_file_name, "w");
// Configuration of curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host . $file);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 8192);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
$curl_info = curl_getinfo($ch); // Tests for success later
curl_close($ch);
fclose($fp);
if (is_resource($fp)) {
fclose($fp); // CURL bug
}
Look out for the need to double-close the file resource - bugfix went in
Sept 2009 but isn't in PHP 5.2.10 which isn't *that* old.
If there is any known conflict with PGP-CGI or JavaBridge, could you let
me know? It might save many hours of pain and misery with testing...
Cheers,
Mark...
|
|
From: <php...@li...> - 2010-02-05 07:42:08
|
I did see your recent email, but the 'Websockets' references threw me. So it should be added in the next release, and I'll just need to add the 'Transfer-Encoding: Chunked' header. Cool - I'll watch the mailing lists for news on the next release. Cheers, and many thanks for the quick reply. Mark... |
|
From: <php...@li...> - 2010-02-05 07:01:38
|
Hi Mark,
On Fri, 2010-02-05 at 13:17 +0700,
php...@li... wrote:
> while(!feof($fs)) {
> $contents = fgets($fs, 4096); // Chunk download
HTTP/1.1 chunked encoding is not supported by the CGI spec. CGI expects
the CONTENT_LENGTH header. If it is missing, php-cgi will wait forever
until it is destroyed.
The FastCGI SAPI does support it; and all php-cgi binaries > 5.2.0 are
compiled with --enable-fastcgi per default.
I will add a new method to the PHPFastCGIServlet in version 5.5.6, which
will allow clients to establish a two-way connection with the php script
using either "Connection: Upgrade" (WebSockets) or Transfer-Encoding:
Chunked (semi-standard HTTP tunnel).
Please see my previous mail for details.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2010-02-05 06:24:18
|
Hi,
I'm doing a fairly simple streaming download, looping for a number of
different files, and I'm getting sporadic, unrepeatable severe errors in
PhpCGIServlet.
The code will successfully download some files, or parts of some files,
but will sometimes cause a crash. It might download 850MB without a
hiccup, or fail partway through a file at 20MB. If I rerun the code, it
might download the file it previously failed on, or I might need to run
it two or three times to get it to work, then it might download all
other files with no problems.
The code has been tested using the most up-to-date JavaBridge,
php-script and php-servlet jar files and the error still occurs. The PHP
has been tested in Apache webserver and there is no evidence of the
error there. Tomcat is running on a VMWare instance with PHP-CGI, and
Apache is running on the host machine with the Apache PHP server module.
Any advice would be welcome.
Using:
PHP 5.2.10
Tomcat 6.0.20
Apache 2.2.10
Cheers,
Mark...
Extract of error log:
INFO: PHP Warning: unlink(sync.lck) [<a
href='function.unlink'>function.unlink</a>]: Permission denied in
C:\player.php on line 15
Feb 5, 2010 12:53:19 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Feb 5, 2010 12:53:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Feb 5, 2010 12:53:19 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Servlet PhpCGIServlet threw unload() exception
javax.servlet.ServletException: Servlet.destroy() for servlet
PhpCGIServlet threw exception
at
org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1413)
at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1739)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4563)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1248)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1219)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:316)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:633)
at org.apache.catalina.startup.Catalina.start(Catalina.java:608)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at php.java.bridge.Util$Process.getOutputStream(Util.java:1071)
at php.java.servlet.fastcgi.ChannelFactory.destroy(ChannelFactory.java:149)
at php.java.servlet.fastcgi.FastCGIServlet.destroy(FastCGIServlet.java:296)
at php.java.servlet.PhpCGIServlet.destroy(PhpCGIServlet.java:195)
at
org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1394)
... 20 more
The code extract is here. The error is occuring in the '// Chunk
download' loop:
$fs = fsockopen($host, 80, $errno, $errstr, 30);
if (!$fs) {
$this->writeDebugInfo("FAILED: ", $errstr . '(' . $errno .
')');
} else {
$out = "GET $file HTTP/1.0\r\n";
$out .= "Host: $host\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fs, $out);
$fm = fopen ($temp_file_name, "w");
stream_set_timeout($fs, 30);
while(!feof($fs) && ($debug = fgets($fs)) != "\r\n" ); //
ignore headers
while(!feof($fs)) {
$contents = fgets($fs, 4096); // Chunk download
fwrite($fm, $contents);
}
fclose($fm);
$info = stream_get_meta_data($fs);
fclose($fs);
if ($info['timed_out']) {
// Delete temp file if fails
unlink($temp_file_name);
$this->writeDebugInfo("FAILED: Connection timed out: ",
$temp_file_name);
$this->writeDebugInfo("stream info: ", $info);
} else {
// Move temp file if succeeds
$media_file_name = str_replace('temp/', 'media/',
$temp_file_name);
rename($temp_file_name, $media_file_name);
$this->writeDebugInfo("SUCCESS: ", $media_file_name);
$this->writeDebugInfo("stream info: ", $info);
}
}
|