How Install/Insert Script Code

I have just come across this useful page of Dolibarr Scripts, but I do not know how to make use of these scripts on my Dolibarr installation.

  1. Do I create a new module and just copy and paste the code?

This is the link:


You just need to call the script with 4 arguments :

Usage: $script_file (test|confirm) (thirdparties|contacts) [delay] [after]
Send an email to customers to remind all unpaid customer invoices
If you choose ‘test’ mode, no emails are sent.
If you add param delay (nb of days), only invoice with due date < today + delay are included
If you add param after (nb of days), only invoice with due date >= today + delay are included

Hi @ksar

I am a novice with scripts. Do you mind assisting with the steps from scratch?

Does this script exist already in the installation? if no, how do I go about installing it?


It is not part of the installation.
I can try to help you but this will depend on where is the dolibarr installed ?

First step is to download the script :

I have installed it on a Bluehost hosting plan

I have downloaded the file @ksar


Then you need to upload this file in your hosting.
It should be the same directory structure than on Github :

  1. The script should be on /scripts/invoices
  2. The Dolibarr on /htdocs

Then you can run the script, depending on what access you have on O2 (SSH or run with Cron)

Hi @ksar, I have just gained access via Command Line. I installed Dolibarr using Softaculous and I notice that it does not have /htdocs file or is not installed on htdocs…

“I am sorry, actaully you are in Shared hosting plan, so this will not work on this account
That need a VPS or Dedicated hosting plan
I do apologize for the inconvenience caused by the other agent
To run the Git, you need the root access to the server , which is not available on the shared hosting”

My hosting provider just responded with the above.

Is the no other way around this on a shared plan?

@mmsaaa can this work on a shared hosting plan?

yes its work on shared hosting. My sites are on siteground i used one of the folder within my hosting and allocated unused domain. You can also create subdomain etc in your hosting.

use ftp, in one of your folder upload the zip file extract there it will create lot of subfolder just bring the to the main folder where you want by moving files in ftp either of your host and read the instructions given in the read file i believe and it will work.

I am copying here you can find the instructions on github page also

Advanced setup

You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.

  • Check that your installed PHP version is supported see PHP support.
  • Uncompress the downloaded .zip archive to copy the “dolibarr/htdocs” directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git): git clone -b x.y (where x.y is main version like 3.6, 9.0, …)
  • Set up your web server to use " dolibarr/htdocs " as root if your web server does not have an already defined directory to point to.
  • Create an empty htdocs/conf/conf.php file and set write permissions for your web server user ( write permission will be removed once install is finished)
  • From your browser, go to the dolibarr “install/” pageThe URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like: http://localhost/dolibarr/htdocs/install/ or http://localhost/dolibarr/install/ or http://yourdolibarrvirtualhost/install/
  • Follow the installer instructions

Ohh, I have already installed Dolibarr using Softaculous… it is the easiest way.

I though you were referring to the installation of the script

1 Like

that was also easy after uploading you can simply run the installation file, anyhow will check Softaculous how easy is that. thank you.

I do not think you understand me @mmsaaa.

I have already installed Dolibarr. But I want to activate or install an addon script

Hi there.

The script you are referring to is already included in dolibarr. I am not sure of the folder structure on your cloud solution but you should be able to navigate to the scripts folder and run PHP commands in terminal/cmd/powershell, as mentioned by @ksar.

Hi @tindoshox

My installation is on shared hosting plan and my host informed me that I do not have access to root or Command Line.

I do not see the /scripts folder, all the modules are unpacked on public_html/billing folder.

Also, I do not see invoice folder even under the Accountancy Module.

On my installation the scripts folder is outside the htdocs. i.e /var/www/html/scripts

In terminal run the command: “locate email_unpaid_invoices_to_customers.php”.

This will show you where this script is located.