Getting Ubuntu 14.04 php5enmod to understand module priority

Posted on October 5th, 2014 in PHP by Brandon

Usage of Debian’s php5enmod module doesn’t seem to be documented anywhere except from the command line when calling it without any arguments:

user@host:~# php5enmod
WARNING:
usage: php5enmod [ -s ALL|sapi_name ] module_name [ module_name_2 ]

Unfortunately, that provides no information on how to customize the priority of a module when enabling it. Some others seem to think that you should be able to provide a priority level on the command line, but that doesn’t work.

It took some digging into the bash scripts to figure out how to make it work. The trick is to add a comment in the .ini file for the module. The comment must contain a very specific format of:


zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so
; priority=1

The ‘priority’ line must be in that format exactly and most not contain any other spaces or characters. The line must start with a semicolon, followed by a space, followed by priority=, and finally the desired priority level. The only space on the line must be between the semicolon and the word ‘priority’.

2 Responses to 'Getting Ubuntu 14.04 php5enmod to understand module priority'

Subscribe to comments with RSS or TrackBack to 'Getting Ubuntu 14.04 php5enmod to understand module priority'.


  1. on October 6th, 2014 at 3:35 am

    Thanks for this, I looked at some of the existing extensions to try to figure this out and assumed the priority line was a comment like the line above it.


  2. on October 6th, 2014 at 4:01 am

    Note that to be consistent with the other extensions and display in the correct order in the terminal your Ioncube example should be ; priority=01 instead of ; priority=1. I’m guessing this doesn’t have any affect on the real priority though.

Post a comment