Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some extensions checks are missing #981

Closed
da-sti opened this issue Sep 14, 2016 · 3 comments
Closed

Some extensions checks are missing #981

da-sti opened this issue Sep 14, 2016 · 3 comments

Comments

@da-sti
Copy link

da-sti commented Sep 14, 2016

hi,

the problem is in the title, I suggest that it covers all php extensions (mandatory and optional) this will make the installation process more reliable.

This could be extended to a feature for plug-ins -> i.e. if you install a plugin, you have a section where you can verify that all php extensions are covered for this plugin.

tested on freebsd 10.3 + glpi 0.90.5.1

Best regard
dasti

@trasher
Copy link
Contributor

trasher commented Apr 24, 2017

I do not understand the point.

Required extensions are tested from installation using:
https://github.com/glpi-project/glpi/blob/9.1/bugfixes/inc/toolbox.class.php#L930

As of plugins, it's up to them to check their requirements.

Closing as invalid; feel free to reopen if I've missed something.

@trasher trasher closed this as completed Apr 24, 2017
@da-sti
Copy link
Author

da-sti commented Apr 25, 2017

here's the list in my procedure (done by trial and error)

php56-ctype php56-curl php56-exif php56-fileinfo php56-gd php56-imap php56-json php56-ldap  php56-mbstring php56-mysql php56-mysqli php56-session php56-simplexml php56-wddx php56-xml php56-xmlrpc php56-zlib php56-filter`

I have also this (can't remember why I noted those ones)

php-date ?
php-PHPmailer ?
php-tcpdf ?

here's a list in github that I got from IRC
https://github.com/remicollet/remirepo/blob/master/glpi/glpi/glpi.spec#L69

on the 1rst page of github there also another list
https://github.com/glpi-project/glpi

Mandatory PHP extensions:
    json
    mbstring
    mysqli
    session
    gd (picture generation)
    curl (CAS authentication)
Recommended PHP extensions (to enable optional features)
    domxml (CAS authentication)
    imap (mail collector and users authentication)
    ldap (users authentication)
    openssl (encrypted communication)

and finally glpi install test has a list that

I didn't checked all of this recently but when I documented this all those lists where different.

  • Having one list could be nice
  • an information on if it's optional or not
  • an information on why it's optional (or for what optional feature requires it)
  • Extending this idea to plugins it a step further on trying to avoid wasting time on just installing stuff
php extension name needed for?
xxxxx glpi optionnal (ldap) + plugin fusion inventory
mysqli glpi base

@trasher
Copy link
Contributor

trasher commented Apr 25, 2017

Here is the output from phpcompatinfo:

Extensions Analysis

    Extension    Matches REF          EXT min/Max     PHP min/Max PHP all 
    Core                 Core         5.4.0           5.4.0               
    Reflection           Reflection   5.0.0           5.0.0               
    SimpleXML            SimpleXML    5.0.1           5.0.1               
    Zend OPcache         Zend OPcache 7.0.2           5.2.0               
    apc                  apc          2.0.0           4.0.0               
    ctype                ctype        4.0.4           4.0.4               
    curl                 curl         5.1.3           5.1.3               
    date                 date         5.2.0           5.2.0               
    fileinfo             fileinfo     1.0.5-dev       5.3.0               
    filter               filter       0.11.0          5.0.0               
    gd                   gd           4.0.6           4.0.6               
 C  imap                 imap                         4.0.0               
    json                 json         5.4.0           5.4.0               
 C  ldap                 ldap         5.4.0           5.4.0               
    mbstring             mbstring     5.3.0           5.3.0               
    mysqli               mysqli       5.0.0           5.0.0               
    pcntl                pcntl        4.1.0           4.1.0               
    pcre                 pcre         4.0.5           5.1.0               
 C  session              session      4.0.0           4.3.2               
    spl                  spl          5.1.3 => 5.2.17 5.1.3               
    standard             standard     7.0.2           7.0.2               
    wddx                 wddx         4.0.0           4.0.0               
    xhprof               xhprof       0.9.0           5.2.0               
    xml                  xml          4.0.0           4.0.0               
    xmlrpc               xmlrpc       4.1.0           4.1.0               
    Total [25]                                        7.0.2               

Some may be indeed missing, some you've listed (like exif for example) does not seems to be required.

Having one list could be nice

I do not think this is not possible. There are already 2 different lists of extensions in sources (in the code itself and in the composer.json file) that have to be handled manually. Same for the one on the README.
And of course, there are chances that changes are not reported on every list.

an information on if it's optional or not

This information is already provided.

an information on why it's optional (or for what optional feature requires it)

Might be a good idea; but would be also quite huge job... We'll have to find where they are used, and understand which part of the code may require it (it is not always clear); and we'll have to change parts of the code in order to add and display this information.
This point should be reported in another ticket I guess.

Extending this idea to plugins it a step further on trying to avoid wasting time on just installing stuff

As said previously, plugins are in charge to check their requirements; you'll have to open issues on each plugin that does not check for extensions it requires or not.

@trasher trasher reopened this Apr 25, 2017
@trasher trasher changed the title 1rst install compatibility check doesn't verify all php extentions dependencies Some extensions checks are missing Apr 25, 2017
@trasher trasher added this to the 9.1.4 milestone Apr 26, 2017
trasher added a commit to trasher/glpi that referenced this issue May 5, 2017
Also add some optional checks as well
@trasher trasher closed this as completed in 5de2ce8 May 5, 2017
trasher added a commit that referenced this issue May 5, 2017
Also add some optional checks as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants