[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #24 from carcha...@arcor.de ---
I tested some more. This php error from Comment #17 doesnot come from
pdf-handler. It is a problem with all reuploads of deletetd files , also jpg
and so on. So take that out.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #23 from Tisza Gergő  ---
That makes sense, wfShellExec() uses proc_get_status(). Thanks for getting to
the bottom of that!

If you think a clearer warning would have been useful, I can open a new bug for
that. Maybe wfShellExecDisabled() should check for proc_get_status being
disabled.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #22 from Rob Kam  ---
I think it's not $wgPdfHandlerDpi = '150'; - I've removed that from
LocalSettings,php and uploaded a pdf. It's dimensions are then given as 0 × 0
(533 KB), re-uploading the same file gets the same result, but ... 

... removing proc_get_status from the disable_functions line in php.ini and it
works. With proc_get_status allowed, PdfHandler works for a fresh pdf on its
first upload. 

There was some warning about proc_get_status yesterday so I'd removed that from
the disable_functions, which then made it seem that specifying 150 had made it
work.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #21 from Tisza Gergő  ---
And if you remove that line from LocalSettings.php, PDF uploads break again?
Also, could you test what happens if you set it as a number and not as a string
(that is, $wgPdfHandlerDpi = 150; )?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #20 from Rob Kam  ---
LocalSettings.php:
require_once "$IP/extensions/PdfHandler/PdfHandler.php";
$wgPdfPostProcessor = $wgImageMagickConvertCommand; // defined via ImageMagick
$wgPdfHandlerDpi = '150';

PdfHandler.image.php:65:
global $wgPdfHandlerDpi;

PdfHandler.image.php:86: 
$width  = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi );

PdfHandler.image.php:88:
$height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi );

PdfHandler.php:47:
$wgPdfHandlerDpi = 150;

PdfHandler_body.php:136:
global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfHandlerDpi;

PdfHandler_body.php:193:
"-r{$wgPdfHandlerDpi}",

Nothing in php.ini

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #19 from Tisza Gergő  ---
I'm not convinced this is fixed. $wgPdfHandlerDpi has 150 as its default value
(and that default has been added seven years ago), setting that again should
have no effect, unless there is some deeper bug preventing the default from
being set.

Rob Kam, can you grep for anything setting $wgPdfHandlerDpi to a non-default
value in your code or configuration files?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #18 from Tisza Gergő  ---
Carchaias, sounds like a permission problem. The directory is presumably your
system default directory for temporary files. (See
[[mw:Manual:$wgTmpDirectory]] for configuring that.) You should verify whether
the file exists, is readable, and the copy command works when issued manually.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #17 from carcha...@arcor.de ---
I tried the same (adding $wgPdfHandlerDpi = '150'; to LocalSettings.php,
reupload a file). But when delete a file and reupload in Wiki I get a php error

 [19-Nov-2014 12:53:14 UTC] PHP Warning:  COPY /B /Y "C:\WINDOWS
\TEMP\localcopy_25bb7e96359f-1.tmp" "d:\MediawikiTestwiki_Images
\f\f0\0003_1110_Technische_Dokumentation.pdf"
 C:\WINDOWS\TEMP\localcopy_25bb7e96359f-1.tmp 
 Zugriff verweigert
0 Datei(en) kopiert.
 in C:\Inetpub\Www_root\Testwiki\includes\filebackend\FSFileBackend.php on line
282

In my wikis debug txt file there are several hits to that windows path. Here is
one sequence while reupload:

wfShellExec: "C:\Program Files\xpdf\bin64\pdfinfo.exe" -enc UTF-8 -l 999
-meta "C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp"
PdfImage::retrieveMetaData: "C:\Program Files\xpdf\bin64\pdftotext.exe"
"C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp" -
wfShellExec: "C:\Program Files\xpdf\bin64\pdftotext.exe"
"C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp" -
wfShellExec: "C:\Program Files\xpdf\bin64\pdfinfo.exe" -enc UTF-8 -l 999
-meta "C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp"
PdfImage::retrieveMetaData: "C:\Program Files\xpdf\bin64\pdftotext.exe"
"C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp" -
wfShellExec: "C:\Program Files\xpdf\bin64\pdftotext.exe"
"C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp" -
FSFile::getProps: C:\WINDOWS\TEMP/localcopy_25bb7e96359f-1.tmp loaded, 57638
bytes, application/pdf.
UploadBase::verifyExtension: mime type application/pdf matches extension pdf,
passing file

I cant't remember having some path configured to windows/temp.

The file reupload itself worked but there is still no pdf-thumbnail.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #16 from Rob Kam  ---
Thanks for your help. With $wgPdfHandlerDpi = '150'; it's now working fine.
I'll delete the old files and re-upload them afresh.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #15 from Gilles Dubuc  ---
I think that the only way to fix the first version is to manually edit the
database entry for the file's metadata. Since it was uploaded before you had
the shell stuff configured correctly, it probably recorded "0" as the
width/height of the page. And now all scripts that you attempt to run on it
don't do what they're supposed to because they abort, based on the fact that
they don't have any page size information for that file.

Alternatively if you don't want to manually tweak the DB, you can probably
delete the entire page and reupload the same file in its place. Then you won't
have the old broken version anymore.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #14 from Rob Kam  ---
LocalSettings.php now has the line $wgPdfHandlerDpi = '150';

Strangely if I go to the file page and do Upload a new version of this file -
using the original file for the upload, it then works, displaying thumbnails
etc. However on the file page there is still no thumbnail for the first upload
in the file history.

#pdfinfo -enc UTF-8 -l 999 -meta Polyester_capacitor.pdf
Fontconfig error: Cannot load default config file
Title:
Subject:
Keywords:
Author:
Creator:
Producer:   Foxit Reader PDF Printer Version 7.0.1.831
CreationDate:   Tue Oct 14 17:11:56 2014
ModDate:Tue Oct 14 16:12:07 2014
Tagged: no
Pages:  1
Encrypted:  no
Page1 size: 803.155 x 346.817 pts
File size:  53427 bytes
Optimized:  no
PDF version:1.7
Metadata:


   http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
  http://ns.adobe.com/xap/1.0/";
 xmlns:dc="http://purl.org/dc/elements/1.1/";
 xmlns:pdf="http://ns.adobe.com/pdf/1.3/";
 

   

 
 

   

 
 
   
   
   
 
 



 
 
 Foxit Reader PDF Printer Version
7.0.1.831
 
 2014-10-14T17:11:56+01:00
 2014-10-14T15:12:07+01:00
  
   



-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

Gilles Dubuc  changed:

   What|Removed |Added

 CC||gdu...@wikimedia.org

--- Comment #13 from Gilles Dubuc  ---
Have you tried re-uploading the same file as a new version of the existing one?

I've dug up the exact command that PdfHandler runs and it's the following:

pdfinfo -enc UTF-8 -l 999 -meta Polyester_capacitor.pdf 

Please run that exact command and post its output for all files that fail.

Also, make sure that $wgPdfHandlerDpi is set to a value greater than 0 (I
believe the default is 150).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

Andre Klapper  changed:

   What|Removed |Added

 CC||mr...@trash-mail.com

--- Comment #12 from Andre Klapper  ---
*** Bug 72349 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-11-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

Andre Klapper  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #11 from Rob Kam  ---
I've done both refreshImageMetadata.php -f and rebuildImages.php -f but the pdf
still doesn't display.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

Andre Klapper  changed:

   What|Removed |Added

   Priority|Unprioritized   |Normal

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #10 from Rob Kam  ---
pdfinfo HRM_OSC_SUB_flowchart.pdf
Fontconfig error: Cannot load default config file
Title:  HRM_OSC_SUB_flowchart.eps
Author: Rob Hordijk
Creator:CorelDRAW
Producer:   Acrobat Distiller 5.0.5 (Windows)
CreationDate:   Mon Jul  7 12:01:54 2014
ModDate:Mon Jul  7 12:01:54 2014
Tagged: no
Pages:  1
Encrypted:  no
Page size:  624 x 356 pts
File size:  15450 bytes
Optimized:  yes
PDF version:1.3

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #9 from Rob Kam  ---
Created attachment 16771
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=16771&action=edit
Another pdf that fails to render.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #8 from Tisza Gergő  ---
Can you test the pdf with the pdfinfo version you have on the server and see if
it correctly extracts something like "Page size"?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #7 from Rob Kam  ---
The problem is with the pdf, it's working fine with other pdfs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #6 from Tisza Gergő  ---
You normally get "does not allow inline display" if the media handler cannot
figure out the size of the image, which probably means that calling pdfinfo
fails. Try to enable debug logging ([[mw:Manual:How_to_debug]]) and look for
any error reports in the log files (the relevant line should be prefixed with
[exec]).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #5 from Rob Kam  ---
Image thumbnailing is fixed now but still getting "Linker::makeImageLink:
File:Lorem.pdf does not allow inline display".

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #4 from Rob Kam  ---
Sorry ... I think I've found there is a problem with the config - perhaps
because of the way the shell is restricted aka jailshell. A newly uploaded png
also doesn't get thumbnailed. 

In php.ini there is: disable_functions = "dl, exec, shell_exec, system,
passthru, popen, pclose, proc_nice, proc_get_status, pfsockopen, leak,
apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,
posix_setuid"

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #3 from Rob Kam  ---
I've had a look at 70083. showJobs.php gives 0. runjobs.php --type
createPdfThumbnailsJob ran okay. gs convert pdfinfo pdftotext all run okay from
the command line, although I've not tried any interactively with the pdf.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

--- Comment #2 from Rob Kam  ---
Created attachment 16767
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=16767&action=edit
Polyester_capacitor.pdf

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72044] Linker::makeImageLink: File: .... .pdf does not allow inline display

2014-10-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72044

Tisza Gergő  changed:

   What|Removed |Added

   See Also||https://bugzilla.wikimedia.
   ||org/show_bug.cgi?id=70083

--- Comment #1 from Tisza Gergő  ---
Similar to bug 70083 (see bug 70083 comment 5).

Rob Kam, can you share the PDF?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l