Menu

#1289 itop doesn't work without zip support in php

Unassigned
new
nobody
Setup/Packaging
Low
2.3.1
defect
2018-07-19
2016-08-10
bgtvfr
No

Hello dear itop developpers,

I really appreciate your opensource project about IT management.
However, I found a little bug that made me waste some time.

Therefore, I open this ticket. I hope this will save time to other people if they come accross the same issue.
In my best dreams, you would take a little of your time to improve source code or documentation.

Thanks in advance.

BR

==== Summary : ====
itop won't install without zip support in php

==== How to reproduce : ====

  • Install linux (eg centos 6.5).
  • Install mysql and a webserver (eg apache2)
  • Compile php (eg 5.6.24) from source (btw centos6 does not provide the minimum php version requiered by itop, this can be IMHO added to the documentation so that people might want to install centos 7).

You can install php without zip support by typing :
./configure --prefix=/usr/local/php \
--with-libdir=lib64 \
--with-apxs2=/opt/apache/bin/apxs \
--with-openssl-dir=/opt/openssl \
--with-openssl \
--with-mcrypt \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--enable-sockets \
--with-pcre-regex \
--with-gettext \
--with-pear \
--with-zlib \
--with-gd \
--enable-soap \
--with-ldap \
--with-mysql-sock=/var/lib/mysql/mysql.sock

Now go to your webserver :

http://example/web/setup/index.php

You should be able to see the following error :
[Tue Aug 9 17:37:10 2016] 127.0.0.1:39488 [500]: /web/setup/index.php - Class 'DBBackup' not found in /pathto/web/setup/ applicationinstaller.class.inc.php on line 1038

After investigating, this is due the following piece of code :
if (class_exists('ZipArchive')) // The setup must be able to start even if the "zip" extension is not loaded

It does load DBBackup if zip support is disabled

==== Solution ====
Fix the code

==== Workaround ====
Document php zip module as being mandatory.

The following command can be used to compile php on centos 6.5 to make itop work :
./configure --prefix=/usr/local/php \
--with-libdir=lib64 \
--with-apxs2=/opt/apache/bin/apxs \
--with-openssl-dir=/opt/openssl \
--with-openssl \
--with-mcrypt \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--enable-sockets \
--enable-zip \
--with-pcre-regex \
--with-gettext \
--with-pear \
--with-zlib \
--with-gd \
--enable-soap \
--with-ldap \
--with-mysql-sock=/var/lib/mysql/mysql.sock

Discussion

  • RODRIGO PAVEZ VALENUELA

    Where and how I must execute those commands??, I've no idea.

    Thanks!

     
  • Hipska

    Hipska - 2017-08-03

    Hi Rodrigo, what do you mean?

    Do you have this problem? Which Linux distribution and version are you using? Please also give your php version. Thanks.

     
  • fibojack

    fibojack - 2018-07-19

    I have the same problem, but I'm working with ubuntu server 18.04 lts and php 7.1
    I have verified that have installed php7.1-zip, so what can I do?

     

Log in to post a comment.

MongoDB Logo MongoDB