You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2005-09-08 01:44:23

JeremyVanVeelen
Member
Registered: 2005-09-08
Posts: 4

Management Documents and PDFs

I am using GLPI 0.6 RC2, and find it a very useful piece of software!  Great jobs guys, it seems that you have put a lot of effort into making this a top notch well-integrated product.  Keep up the fine work.

GPLI is install on a Cent-OS 3 (RHEL 3 compatable) server with apache2.  I am able to create/upload word and text files, but when I go to upload a pdf I get a popup with "The document contains no data."

I am not sure what I am doing wrong here.

Offline

#2 2005-09-08 13:19:45

JMD
GLPI - Lead
Registered: 2004-09-13
Posts: 9,180
Website

Re: Management Documents and PDFs

Perhaps your pfd is too big.

Have a look to you php.ini

php.ini (apache directory) line upload_max_filesize = xM  where x is the max size of your document.


JMD / Jean-Mathieu Doléans - Glpi-project.org - Association Indepnet
Apportez votre pierre au  projet GLPI   : Soutenir

Offline

#3 2005-09-08 20:58:35

JeremyVanVeelen
Member
Registered: 2005-09-08
Posts: 4

Re: Management Documents and PDFs

That was an intial concern, but my pdf's are under 2MB.  But I did modify the upload_max_filesize to be 4MB, and uploads are enabled on php.

Offline

#4 2005-09-08 21:46:35

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Management Documents and PDFs

First is magic_quote_runtime activated in the php.ini ?

Then, could you try something : comment in the file glpi/common/functions.php

the following lines near the line 3550 in the sendFile function :
header("Content-disposition: filename=\"$filename\"");
header("Content-type: ".$mime);
header('Pragma: no-cache');
header('Expires: 0');

Then could you put in the forum that you will see when you access to the PDF file.

Could you also add
echo $mc."<br>";
after the line
$mc=get_magic_quotes_runtime();
and
echo get_magic_quotes_runtime();
after the next line
if ($mc) @set_magic_quotes_runtime(0);

Thanks


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#5 2005-09-08 23:22:48

JeremyVanVeelen
Member
Registered: 2005-09-08
Posts: 4

Re: Management Documents and PDFs

My magic_quotes_runtime was off, I have set it to "magic_quotes_runtime = On" and made the changes to the functions.php.

Still happened.  But I have not checked my apache error_log.  Here's what I see.  I shall lookup this error and make a reply, unless somebody else is quicker.

BTW, thanks for the incredible help and time, you directions were clear and your insight has been very helpful.

[Thu Sep 08 14:13:54 2005] [error] [client 192.168.1.73] Requested content-length of 1026914 is larger than the configured limit of 524288, referer: http://vicbak/glpi/documents/documents-info-form.php

Offline

#6 2005-09-08 23:31:09

JeremyVanVeelen
Member
Registered: 2005-09-08
Posts: 4

Re: Management Documents and PDFs

I got it to work with the following

In Fedora or RHEL I had to modify /etc/httpd/conf.d/php.conf  LimitRequestBody

<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
-    LimitRequestBody 524288
+    LimitRequestBody 4194304
</Files>


I have also read that when allowing the large file sizes that it may impact the php memory_limit in the php.ini.  While my setup works fine for now with 8M, it may not work for everybody.

Offline

#7 2005-09-09 10:14:29

baaz
Member
Registered: 2004-09-13
Posts: 513

Re: Management Documents and PDFs

Ok thanks for this report, it may help many peoples.

That's great, it's working smile


Bazile Lebeau

Offline

Board footer

Powered by FluxBB