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 2009-04-26 13:16:58

tan.tran
Member
Registered: 2009-04-26
Posts: 9

Unable to delete a software license

Hi all,

I'm  wondering is this a bug in GPLI.

When i try to delete any software license record that has a expiration date set, i'm unable to delete it unless i clear expiration date.

If i try to delete this license directly from MYSQL statement, it suceed.

Can you plz help?

I'm using GPLI 0.71.5 running on Fedora Core 10.

Many thanks.

Tandy,

Offline

#2 2009-04-26 13:28:20

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

Re: Unable to delete a software license

I can't reproduce...

Can you explain your exact way to reproduce ?
Any message in debug mode ?

+


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

#3 2009-04-26 13:39:18

tan.tran
Member
Registered: 2009-04-26
Posts: 9

Re: Unable to delete a software license

When i add a license for a software and set expiration date, then try to delete that record. It doesn not delete. Only way i can delete is to clear expiration date or delete from mysql.

I'm not sure how to turn on debug mode so plz show me. I'm a newbie to GLPI.

Many thanks,

Tandy

Offline

#4 2009-04-26 13:40:33

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

Re: Unable to delete a software license

Just follow the link in my previous post.


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

#5 2009-04-26 14:01:26

tan.tran
Member
Registered: 2009-04-26
Posts: 9

Re: Unable to delete a software license

Hi Remi,

Thanks for your quick reponse,

After turn on debug, there is no error shown in SQL request.

Did you able to reproduce the problem after set expiration date for a license?

Plz help.

Thanks,

Tandy.

Offline

#6 2009-04-26 14:44:55

tan.tran
Member
Registered: 2009-04-26
Posts: 9

Re: Unable to delete a software license

Hi,

Below is MYSQL backtrace

Backtrace :
/usr/share/glpi/inc/software.function.php:1178          DBmysql->query()
/usr/share/glpi/front/software.licenses.php:144         deleteSimilarLicenses()
/usr/share/glpi/front/software.licenses.php
2009-04-26 22:28:26
*** MySQL query error :
***
SQL: SELECT ID FROM glpi_licenses WHERE version=\'test1\'
                                                AND serial=\'\'
                                                AND oem=\'0\'
                                                AND oem_computer=\'-1\'
                                                AND buy=\'1\'
                                                AND sID=\'63\'  AND .expire = \'2011-04-07\'
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '2011-04-07'' at line 6
Backtrace :
/usr/share/glpi/inc/software.function.php:1178          DBmysql->query()
/usr/share/glpi/front/software.licenses.php:144         deleteSimilarLicenses()
/usr/share/glpi/front/software.licenses.php

Plz help.

Thanks,

Tandy

Offline

#7 2009-04-26 15:05:30

tan.tran
Member
Registered: 2009-04-26
Posts: 9

Re: Unable to delete a software license

Hi,

After remove . in software.function line 1178, now i can remove license file that had expiration date set.

I'm wondering anyone else this problem except me?

Tandy

Offline

#8 2009-04-26 15:13:22

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

Re: Unable to delete a software license

As I said, debug mode and Backtrace are really need for us.

Tanks for the report
Fix commited : https://dev.indepnet.net/glpi/changeset/8236

+

P.S. seems to be a very old bug... (more than 1 year old)


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

Board footer

Powered by FluxBB