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 2010-09-29 17:44:58

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

make documents with order module

Hi
i have the following glpi version:
GLPI 0.72.4 Copyright (C) 2003-2010 by the INDEPNET Development Team.
and I have the last order module... I'd like to make the document in odt format... How do I make it ?
thx so much!


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#2 2010-09-29 20:06:18

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: make documents with order module

What do you mean by "make the document in odt format" ?

You want to add odt document in glpi ?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2010-09-30 09:46:58

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

You have un generation tab into your order fo doing that. (You must choose your odt model into your preferences)


Xavier Caillaud
Blog GLPI Infotel

Offline

#4 2010-09-30 12:38:29

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

I have installed "order management" version 1.1.2 but I havent any "generation tab" in the order. Also I havent anything to configure under the plugin... only "default vat" and "verify order".
Thnx


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#5 2010-09-30 12:59:44

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

Order tab into your created order ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#6 2010-09-30 17:51:43

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

Yep I have an empty "order" tab


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#7 2010-09-30 21:30:30

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

your order is validated ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#8 2010-10-01 18:46:53

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

I think yes, but under validation tab I dont see any "validated" but I see that I cannot modify it.

bye


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#9 2010-10-13 17:38:35

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

Hi again, I put glpi in debug mode and under tab "order" I see:
PHP ERROR: Undefined index: parser in /usr/share/glpi/plugins/order/inc/plugin_order.order.class.php at line 675


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#10 2010-10-13 17:49:51

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

check your dict file order/locales/en_GB.php you must have $LANG['plugin_order']['parser'][4] = "Thanks to select a template in your preferences";


Xavier Caillaud
Blog GLPI Infotel

Offline

#11 2010-10-13 18:49:39

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

Hi ok I understood what's happened...
Before upgrade to the last versione of order plugin I had an hand made translation of en_GB.php in to italian (it_IT.php) after the upgrade I have forgot to upgrade the it_IT.php so it missed about 4 lines of the new en_GB.php ... now I can see the button to generate the doc... but if I click on it I have the following new error:


PHP ERROR: mkdir() [function.mkdir]: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 50
PHP ERROR: mkdir() [function.mkdir]: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 50
PHP ERROR: mkdir() [function.mkdir]: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 50
PHP ERROR: file_put_contents(./tmp/content.xml) [function.file-put-contents]: failed to open stream: No such file or directory in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 94

Fatal error: Uncaught exception 'OdfException' with message 'Error during file export' in /usr/share/glpi/plugins/order/lib/odtphp/odf.php:250 Stack trace: #0 /usr/share/glpi/plugins/order/lib/odtphp/odf.php(266): Odf->_save() #1 /usr/share/glpi/plugins/order/inc/plugin_order.order.class.php(819): Odf->exportAsAttachedFile() #2 /usr/share/glpi/plugins/order/front/plugin_order.generate.php(51): PluginOrder->generateOrder('16') #3 {main} thrown in /usr/share/glpi/plugins/order/lib/odtphp/odf.php on line 250

It seems a permission problem... but with a
chmod -R 777 /usr/share/glpi/plugins/order
nothing is changed..


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#12 2010-10-15 21:47:28

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

chmod on tmp dir ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#13 2010-10-22 12:18:39

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

tsmr wrote:

chmod on tmp dir ?

[root@srv-ticket /]# ls -laZ|grep tmp
drwxrwxrwt  root root system_u:object_r:tmp_t          tmp


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#14 2010-10-22 13:09:15

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

also under /tmp I see:

# ls -al 8ae65a7376a63eee0484e64b7a93feb6KhLvVI
-rw------- 1 apache apache 16302 22 ott 12:59 8ae65a7376a63eee0484e64b7a93feb6KhLvVI
# file 8ae65a7376a63eee0484e64b7a93feb6KhLvVI
8ae65a7376a63eee0484e64b7a93feb6KhLvVI: OpenDocument Text

Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#15 2010-10-22 13:42:22

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: make documents with order module

> /usr/share/glpi/
Visiblement c'est une installation packagée.

> (./tmp/content.xml)
Visiblement le plugin tente d'écrire dans un chemin qu'il ne devrait pas (/usr/share est en lecture seule, c'est normal)

Donc le plugin devrait utiliser correctement le framework (et donc utiliser GLPI_DOC_DIR."/_tmp/xxxx")

Il faut donc une correction du plugin.

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#16 2010-10-22 14:21:18

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module


Xavier Caillaud
Blog GLPI Infotel

Offline

#17 2010-10-22 16:08:06

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

I'm sorry but I dont speak french...and also I'm not a php programmer but:
   'PATH_TO_TMP' => GLPI_DOC_DIR . '/_tmp'
...apache cant write under root (ex: /_tmp) .....
and I have applied the patch by hand but I have the same error:

PHP ERROR: mkdir() [function.mkdir]: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 50
PHP ERROR: mkdir() [function.mkdir]: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 50
PHP ERROR: mkdir() [function.mkdir]: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 50
PHP ERROR: file_put_contents(./tmp/content.xml) [function.file-put-contents]: failed to open stream: No such file or directory in /usr/share/glpi/plugins/order/lib/odtphp/zip/PclZipProxy.php at line 94

Fatal error: Uncaught exception 'OdfException' with message 'Error during file export' in /usr/share/glpi/plugins/order/lib/odtphp/odf.php:250 Stack trace: #0 /usr/share/glpi/plugins/order/lib/odtphp/odf.php(266): Odf->_save() #1 /usr/share/glpi/plugins/order/inc/plugin_order.order.class.php(824): Odf->exportAsAttachedFile() #2 /usr/share/glpi/plugins/order/front/plugin_order.generate.php(51): PluginOrder->generateOrder('16') #3 {main} thrown in /usr/share/glpi/plugins/order/lib/odtphp/odf.php on line 250

Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#18 2010-10-22 17:01:50

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

And if you do chmod 755 on order/lib/odtphp/zip folder ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#19 2010-10-22 17:30:54

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

the same error with both command:

[root@srv-ticket odtphp]# chmod -R 777 zip/
[root@srv-ticket odtphp]# chmod -R 755 zip/
[root@srv-ticket odtphp]# pwd
/usr/share/glpi/plugins/order/lib/odtphp

Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#20 2010-10-22 17:59:56

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

I have other infos:

[root@srv-ticket files]# ls -al && ls -la _tmp/
totale 216
drwxr-x--- 16 apache root    4096 12 ott 21:28 .
drwxr-xr-x  3 root   root    4096  4 giu 17:06 ..
drwxr-x---  2 apache root    4096  4 giu 18:40 _cache
drwxr-x---  2 apache root    4096  8 ott 13:16 _cron
drwxr-xr-x  2 apache apache  4096 12 ott 21:28 DOC
drwxr-x---  2 apache root    4096  4 giu 18:40 _dumps
drwxr-xr-x  2 apache apache  4096 20 ott 09:43 GIF
drwxr-xr-x  2 apache apache  4096 19 ott 16:58 JPG
drwxr-x---  2 apache root    4096 10 giu 11:05 _lock
drwxr-xr-x  2 apache apache  4096 21 ott 15:35 PDF
drwxr-x---  4 apache root    4096 17 set 11:39 _plugins
drwxr-xr-x  2 apache apache  4096 15 ott 18:02 PNG
drwxr-x---  2 apache root   90112 22 ott 17:51 _sessions
drwxr-x---  2 apache apache  4096 22 ott 17:49 _tmp
drwxr-x---  2 apache root    4096 22 mar  2010 _uploads
drwxr-xr-x  2 apache apache  4096 12 ott 21:28 XLS
totale 36
drwxr-x---  2 apache apache  4096 22 ott 17:49 .
drwxr-x--- 16 apache root    4096 12 ott 21:28 ..
-rw-------  1 apache apache 16302 22 ott 17:49 16facf739c664cf31b50d145a1f08e05FYw6pv
[root@srv-ticket files]# pwd
/var/lib/glpi/files

Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#21 2010-10-25 18:48:48

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

Hi again,
I've tried to change the file order/lib/odtphp/zip/PclZipProxy.php at line 22 in this way:

        const TMP_DIR = '/var/lib/glpi/files/_tmp/tmp2';
        /** const TMP_DIR = './tmp'; **/

and now the error is the following:

PHP ERROR: fopen(pclzip-4cc5b2fc7caa3.tmp) [function.fopen]: failed to open stream: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/pclzip/pclzip.lib.php at line 2544
PHP ERROR: fopen(pclzip-4cc5b2fc7d2a1.tmp) [function.fopen]: failed to open stream: Permission denied in /usr/share/glpi/plugins/order/lib/odtphp/zip/pclzip/pclzip.lib.php at line 2383

Fatal error: Uncaught exception 'OdfException' with message 'Error during file export' in /usr/share/glpi/plugins/order/lib/odtphp/odf.php:250 Stack trace: #0 /usr/share/glpi/plugins/order/lib/odtphp/odf.php(266): Odf->_save() #1 /usr/share/glpi/plugins/order/inc/plugin_order.order.class.php(824): Odf->exportAsAttachedFile() #2 /usr/share/glpi/plugins/order/front/plugin_order.generate.php(51): PluginOrder->generateOrder('16') #3 {main} thrown in /usr/share/glpi/plugins/order/lib/odtphp/odf.php on line 250

How can I exactly know where it try to open files ?
or how can i test the apache user ?


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

#22 2010-10-27 12:07:40

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: make documents with order module

Try to define the path into pclzip.lib.php row 66 like TMP_DIR

if (!defined('PCLZIP_TEMPORARY_DIR')) {
    define( 'PCLZIP_TEMPORARY_DIR', '' );
  }


Xavier Caillaud
Blog GLPI Infotel

Offline

#23 2010-10-27 16:02:33

adminlewis
Member
Registered: 2010-06-22
Posts: 44
Website

Re: make documents with order module

it works!..


Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com

Offline

Board footer

Powered by FluxBB