Closed GoogleCodeExporter closed 9 years ago
Hi Sean:
Is this happening in all browsers or in a specific browser? If this is
happening is a specific browser then would you please share the browser name &
version number?
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 8 Sep 2012 at 6:42
Hi Aldrin,
It is not browser-specific; same problem with Firefox, IE and Chrome. What's
weird is that the "attachment section" of the page shows the correct file
sizes. Any idea on how to troubleshoot? I'd be glad to provide you with
access to the box.
TIA,
Sean.
Original comment by sean.noo...@gmail.com
on 9 Sep 2012 at 4:47
Getting closer. Found this (sanitized) in ssl_error_log:
[Sun Sep 09 10:42:42 2012] [error] [client 1.2.3.4] PHP Warning: Missing
argument 1 for
PageAttachment\\Security\\SecurityManager::isAttachmentDownloadAllowed(),
called in
/var/www/html/wiki/extensions/PageAttachment/download/DownloadManager.php on
line 53 and defined in
/var/www/html/wiki/extensions/PageAttachment/security/SecurityManager.php on
line 504, referer: https://<WIKI_FQDN>/wiki/index.php/Main_Page
[Sun Sep 09 10:42:42 2012] [error] [client 1.2.3.4] PHP Notice: Undefined
variable: protectedPage in
/var/www/html/wiki/extensions/PageAttachment/security/SecurityManager.php on
line 506, referer: https://<WIKI_FQDN>/wiki/index.php/Main_Page
[Sun Sep 09 10:42:42 2012] [error] [client 1.2.3.4] PHP Notice: Undefined
variable: protectedPage in
/var/www/html/wiki/extensions/PageAttachment/security/SecurityManager.php on
line 510, referer: https://<WIKI_FQDN>/wiki/index.php/Main_Page
[Sun Sep 09 10:42:42 2012] [error] [client 1.2.3.4] PHP Warning:
fopen(https://<WIKI_FQDN>/wiki/images/e/ef/my_test_file.txt): failed to open
stream: HTTP request failed! HTTP/1.1 401 Authorization Required\r\n in
/var/www/html/wiki/extensions/PageAttachment/download/FileStreamer.php on line
58, referer: https://<WIKI_FQDN>/wiki/index.php/Main_Page
[Sun Sep 09 10:42:42 2012] [error] [client 1.2.3.4] PHP Warning: fpassthru()
expects parameter 1 to be resource, boolean given in
/var/www/html/wiki/extensions/PageAttachment/download/FileStreamer.php on line
59, referer: https://<WIKI_FQDN>/wiki/index.php/Main_Page
Do I need to define a variable somewhere?
TIA,
Sean.
Original comment by sean.noo...@gmail.com
on 9 Sep 2012 at 5:54
Hi Sean:
The error log helped. Checked the code and it is coding issue. Give me couple
days to upload the fixed version.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 10 Sep 2012 at 3:01
Original comment by Aldrin.Baroi@gmail.com
on 10 Sep 2012 at 3:01
Original comment by Aldrin.Baroi@gmail.com
on 10 Sep 2012 at 3:02
Thanks Aldrin, really looking forward to using this!
Sean.
Original comment by sean.noo...@gmail.com
on 10 Sep 2012 at 3:54
Original comment by Aldrin.Baroi@gmail.com
on 17 Sep 2012 at 8:33
Fixed.
Restarted testing. see Issue 56
Original comment by Aldrin.Baroi@gmail.com
on 17 Sep 2012 at 8:34
Updated status tag.
Original comment by Aldrin.Baroi@gmail.com
on 17 Sep 2012 at 8:35
this is hapening again with 3.1.0
Original comment by radzivi...@gmail.com
on 10 Feb 2013 at 3:45
freebsd 9.1 amd64
php 5.4
mediawiki 1.20.2
PageAttachment 3.1.0
<br />
Warning: fopen(https://ssl.storm.adminim.in.ua/images/0/03/Awb.doc): failed to
open stream: HTTP request failed! HTTP/1.1 401 Authorization Required
in /usr/home/storm/www/htdata/mediawiki/extensions/PageAttachment/download/FileStreamer.php on line 58<br />
<br />
Warning: fpassthru() expects parameter 1 to be resource, boolean given in
/usr/home/storm/www/htdata/mediawiki/extensions/PageAttachment/download/FileStre
amer.php on line 59<br />
Original comment by radzivi...@gmail.com
on 10 Feb 2013 at 4:49
Hi radzivilov:
Based on the error message, looks like it is failing either because URL open is
not enabled or, HTTP Digest Authentication is enabled.
Would you please do the following and share the results:
Test 1) Enabled "allow_url_fopen" in "php.ini" if it is not enabled and test
Test 2) Disable (temporarily) HTTP Basic and Digest Access Authentication in
your Web Server if it is enabled and test to see if downloads work?
Please, let me know.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 10 Feb 2013 at 6:19
Hello,
Thanks a lot.
Disabled basic auth in apache. No errors in logs, and i am able to download
attached file now. Great !
But each download takes over 15 seconds (even if files are very small,
looks like some stuck). Is it expected to be so ?
Original comment by radzivi...@gmail.com
on 10 Feb 2013 at 6:17
Hi radzivilov:
Thank for testing and confirming the issue. I have tried using solutions
provide on "php.net" site at the following link to no avail.
http://php.net/manual/en/function.stream-context-create.php
I'll try to figure out how to make the download work when "Basic" or "Digest"
authentication is enabled in the Web Server.
Now, question on download time: no, it should not take that long; something
causing that delay; cannot think of anything from the top of my head. You
could try turning on MediaWiki profiling and see where the bottleneck is and
share the info with me and I'll give it a shot to resolve it.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 11 Feb 2013 at 7:44
Hi radzivilov:
Looks like got it working with Basic Auth, not sure if the same code would work
with Digest Auth, need to test it.
Also, looks like may have to update the code for new "Swift" file back-end
introduced in MediaWiki version 1.19. Need to check this too.
I have already checked in the code in 3.2.0 branch. You could either check out
the code from the repository or I can upload an alpha release for you to
download. Let me know. In either case, help with testing would be much
appreciated.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 12 Feb 2013 at 10:15
Hello,
I can test it with mediawiki 1.19 and 1.20 also with different php versions.
But i have not found any information about your rerository.
http://code.google.com/p/mediawiki-page-attachment/source/checkout
looks like 3.1.0
extension.version.major=3
extension.version.minor=1
extension.version.patch=0
extension.version.alpha=
extension.version.beta=
Please give me some info about your repository or about alpha release.
Thanks a lot.
Original comment by radzivi...@gmail.com
on 13 Feb 2013 at 8:25
Hi radzivilov:
Please, use v3.2.0 branch.
By the way, project is an Eclipse project and there is an "ant" script to
create the release package. Use "distribute" target to create the zip file.
Let me know if you have any other questions.
Sincerely yours,
Aldrin
Original comment by Aldrin.Baroi@gmail.com
on 14 Feb 2013 at 12:36
In favor of new code (See issue# 75) being developed to support multiple file
repositories, will not fix this code and will remove it in next release. The
new code is more or less working and do not require and additional check for
security settings.
Original comment by Aldrin.Baroi@gmail.com
on 14 Aug 2013 at 8:23
Original issue reported on code.google.com by
sean.noo...@gmail.com
on 7 Sep 2012 at 4:27