How do you Add a New Module - Modules not Showing

I am having trouble adding new modules.

These are the steps I take:

  1. Download module
  2. Upload it to MySite/htdocs
  3. Extract the zip file
  4. Log into my Dolibarr as Admin (the only user at this point)
  5. Go to Setup->Modules
  6. Look for the module I just uploaded

I come unstuck at point 6, as the new modules do not show in the list of modules.
Am I doing something wrong?
Do the permissions on /htdocs have to be changed or something?
Or is there somewhere that I can find more instuctions on how to add/install a new module?

Weblan,
You need to enable the custom folder, see the below link:

Sorry here’s the link:
https://wiki.dolibarr.org/index.php/FAQ_Custom_module_install

It is a lot easier to manage if non-core modules are kept under the ’ /htdocs/custom ’ folder. This way you have one separate folder for each module.

STEP 1 - Enable Dolibarr to see your ‘/custom’ folder

Go to: htdocs / conf / conf.php

Change the values based on your setup

$dolibarr_main_url_root_alt='/custom';
$dolibarr_main_document_root_alt='/home/mydomain/public_html/dolibarr/custom';

STEP 2 - Extract and upload module

2.1 Assuming the downloaded module is already on your local pc, extract to a local folder.
2.2 Upload the actual (extracted) module folder to the ’ htdocs/custom ’ folder. To avoid confusion, you only need to upload the (lowercase) extracted folder which contains all the files.

STEP 3 - Enable the module

Enable the module in the admin interface once you have logged into Dolibarr

Thank you both Arriffidaali and Aljawaid for the information.

On my installation there was no “htdocs/conf/conf.php” so I used the information you gave me to update the /conf/config.php
The result has been that the modules are now recognised, but, when you click their setting button, or the module link in the top bar, you get a server 500 error.

Any ideas?

I think there might be some confusion. If you installed Dolibarr correctly and it worked (you can login and move around etc), then you would have already created a conf.php on the server-side of the files (the ones which were uploaded). This file (conf.php) will not exist in your local folder.

So basically, conf.php would sit here:

www.mydomain.com/dolibarr/conf/conf.php
or

www.mydomain.com/conf/conf.php

If you never had the file, I’m presuming you might be looking in your local files, in which case the 500 error might be a conflict of conf.php files. Always and only use/edit/backup the server-side of conf.php.

Hope the above helps.

Yes, some of the documentation is a bit confusing.

My site was set up via Softaculous via the cPannel.
It did create “site.com/conf/conf.php” AND “/custom” and the site works bar the extra modules at this point.

It did not create “/htdocs” so I manually created it.
The documentation says “In your Dolibarr installation directory, edit the htdocs/conf/conf.php file” which does not exist with:
‘’ $dolibarr_main_url_root = ‘http://localhost/Dolibarr/htdocs’;
$dolibarr_main_document_root = ‘/var/www/Dolibarr/htdocs’;
$dolibarr_main_url_root_alt = ‘/custom’;
$dolibarr_main_document_root_alt = ‘/var/www/Dolibarr/htdocs/custom’;" (modified of course)

So I created “/htdocs/custom” and then modified the “/conf/conf.php” seeing that there is no “htdocs/conf/conf.php” file.

When I make the above changes the site does not load and displays “Error: Dolibarr config file content seems to be not correctly defined.
Please run dolibarr setup by calling page /install.”.

When I make modifications the site works again:
$dolibarr_main_url_root=‘https://site.com ‘;
$dolibarr_main_document_root=’/home/serv26/site.com’;
$dolibarr_main_url_root_alt=’/custom’;
$dolibarr_main_document_root_alt=’/home/serv26/site/htdocs/custom/’;

BUT

As a result, the added modules are now listed in the set up module list,
however, if you click on any of the new module setup buttons OR one of the new feature buttons, you just get a server 500 error or a 400 error.

I have tried a number of combinations but have not found the right one.

@weblan

Compare to my entries in my conf.php below. My Dolibarr is working as mydomain.com/dolibarr/

$dolibarr_main_url_root='http://mydomain.co.uk/dolibarr';
$dolibarr_main_document_root='/home/pewsedofitsc/public_html/dolibarr';
$dolibarr_main_url_root_alt='/custom';
$dolibarr_main_document_root_alt='/home/pewsedofitsc/public_html/dolibarr/custom';
$dolibarr_main_data_root='/home/pewsedofitsc/public_html/dollibar/documents';

I think you are creating a ‘htdocs’ for no reason. The htdocs is a root folder, but not to be defined if that makes sense.

Hi Aljawaid,
Thank you for hanging in.

Yes the only reason I set up the “htdocs” was to match the documented instructions to standardise things, however, I have been trying to get the /htdocs and the /custom options to work. I can get both options to partially work as described above, but not fully.

Thank you for posting your file include.
From what I can see, it is the same as what I have done a number of times with the only difference being that my Dolibarr app is in the root directory and not a sub-directory like your is. This should make no difference.

The problem must be really simple but I have no idea how to get this working.

Try matching one of the below sets:

$dolibarr_main_url_root='http://mydomain.co.uk';
$dolibarr_main_document_root='/home/pewsedofitsc/public_html';
$dolibarr_main_url_root_alt='/custom';
$dolibarr_main_document_root_alt='/home/pewsedofitsc/public_html/custom';
$dolibarr_main_data_root='/home/pewsedofitsc/public_html/documents';

or

$dolibarr_main_url_root='http://mydomain.co.uk/';
$dolibarr_main_document_root='/home/pewsedofitsc/public_html/';
$dolibarr_main_url_root_alt='/custom';
$dolibarr_main_document_root_alt='/home/pewsedofitsc/public_html/dolibarr/custom';
$dolibarr_main_data_root='/home/pewsedofitsc/public_html/documents';

After that, sorry I couldn’t help.

Thanks Aljawaid,
I tried your setting s a few times with no luck.

Unfortunately I think it is time to hire an expert to try and sort this out.

Thanks again for your assistance.

Thanks Aljawaid,
I tried your setting s a few times with no luck.

Unfortunately I think it is time to hire an expert to try and sort this out.

Thanks again for your assistance.