You are not logged in.
Pages: 1
Topic closed
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
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
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
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
Order tab into your created order ?
Xavier Caillaud
Blog GLPI Infotel
Offline
Yep I have an empty "order" tab
Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com
Offline
Offline
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
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
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
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
Offline
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
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
> /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
Essayez ca please :
https://forge.indepnet.net/repositories … /order/402
et
https://forge.indepnet.net/projects/ord … .class.php
Merci Remi
Xavier Caillaud
Blog GLPI Infotel
Offline
Essayez ca please :
https://forge.indepnet.net/repositories … /order/402
et
https://forge.indepnet.net/projects/ord … .class.php
Merci Remi
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
And if you do chmod 755 on order/lib/odtphp/zip folder ?
Xavier Caillaud
Blog GLPI Infotel
Offline
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
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
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
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
it works!..
Linux server e Microsoft Windows 2003/2008 server.
http://predellino.blogspot.com
Offline
Pages: 1
Topic closed