bieli / otrs-mantis-connector

OTRS 3.x (helpdesk system) package for adding issues into MantisBT (bugtracker system) from OTRS (helpdesk system)
4 stars 1 forks source link

perl-rest-client1.pl #1

Open hdering opened 11 years ago

hdering commented 11 years ago

hi bieli,

I'm very interested by your otrs-mantis-connector. Unfortunately, I don't get it work. When I try to open the perl-rest-client1.pl, I get the error:

[Mon Jan 07 12:22:40 2013] errorExec format error: exec of '/usr/lib/cgi-bin/perl-rest-client1.pl' failed [Mon Jan 07 12:22:40 2013] [error] [client 10.0.50.14] Premature end of script headers: perl-rest-client1.pl [Mon Jan 07 12:22:40 2013] [error] [client 10.0.50.14] File does not exist: /var/www/favicon.ico

Could you please help me?

hdering commented 11 years ago

My second question: How I have to add this .pl in OTRS? OTRS needs .opm for paket manager.

hdering commented 11 years ago

I have copied the pl-file to follow directory: /opt/otrs/bin/cgi-bin

changed the permissions: -rwxrwxr-x 1 otrs www-data 939 Jan 7 12:46 perl-rest-client1.pl

now I get follow errors: [Mon Jan 07 12:46:49 2013] [error] Can't locate REST/Client.pm in @INC (@INC contains: /usr/Custom /usr/Kernel/cpan-lib /usr /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs/ /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl . /etc/apache2) at /opt/otrs/bin/cgi-bin/perl-rest-client1.pl line 1.\nBEGIN failed--compilation aborted at /opt/otrs/bin/cgi-bin/perl-rest-client1.pl line 1.\n [Mon Jan 07 12:46:49 2013] [error] [client 10.0.50.14] File does not exist: /var/www/favicon.ico

I installed follow packages: librestclient-ruby ruby-rest-client

but unfortunately it doesn't work.

bieli commented 11 years ago

Probably you must install "REST::Client" and "JSON" module in Perl environment. Please use below example (tested on Debian/Ubuntu Linux):

$ sudo perl -MCPAN -e shell [sudo] password for :

cpan shell -- CPAN exploration and modules installation (v1.960001) Enter 'h' for help.

cpan[1]> install REST::Client ... please select default sugestion , when you see [y/N] question ... compilation / installation / testing for Perl module ... MCRAWFOR/REST-Client-249.tar.gz /usr/bin/make install -- OK

cpan[1]> install JSON ... MAKAMAKA/JSON-2.53.tar.gz /usr/bin/make install -- OK

cpan[2]> exit Lockfile removed. $


Script first start:

$ perl perl-rest-client1.pl $VAR1 = 500; $VAR1 = 'Can\'t connect to mantisbt-1.2.11:80 (Bad hostname)

LWP::Protocol::http::Socket: Bad hostname \'mantisbt-1.2.11\' at /usr/share/perl5/LWP/Protocol/http.pm line 51. '; malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Can't connect to man...") at /usr/local/share/perl/5.14.2/JSON.pm line 171.

You need add virtual host "mantisbt-1.2.11:80" into your web serwer and install there mantisbt-1.2.11. Next step it is copy subdirectory+files from my project: "otrs-mantis-connector / products / MantisBT-REST-API /" into mantisbt api/ subdirectory.

bieli commented 11 years ago

About question "How I have to add this .pl in OTRS? OTRS needs .opm for paket manager." It is my next chellange in this project ;)

dfritz79 commented 11 years ago

Hi, I am also very interested in this package. I use Mantis 1.15 and can not upgrade because some modifications we have done. I hope the package will work for me.

bieli commented 11 years ago

Please share your Manits 1.15 modified code into the GitHub repository, and I look at it.

ycarlier commented 9 years ago

Hello, thank you for that plugin. Yet, I'm having trouble to fully understand how to deploy it on OTRS side, and on Mantis side. And what configuration files should be changed as well? I'm working with OTRS 3.3.4 and Mantis 1.2.16. I created a otrsuser with access level manager on Mantis side and for now I have :

user@server:/var/www/mantis/api/rest# ls -l drwxr-xr-x 5 root root 4096 Mar 31 22:46 Slim -rwxr-xr-x 1 root root 1398 Mar 31 22:46 index.php -rwxr-xr-x 1 root root 211 Mar 31 22:46 mc_issue_add.sh

Thank you in advance.