# Not able to enable invoice numbering module in 3.5

**URL:** <https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485>\
**Category:** Using my Dolibarr\
**Created:** [January 18, 2014, 6:32am UTC](https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485 "2014-01-18T06:32:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mythri](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mythri](https://www.dolibarr.org/forum/u/mythri)\
**Post date:** [January 18, 2014, 6:32am UTC](https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485/1 "2014-01-18T06:32:26Z")

</div>

Hello,

I am using version 3.5 beta. I am trying to enable numbering module mercure for invoice. But it gives me “Forbidden, You don’t have permission to access /path/admin/facture.php on this server.”

Can you please tell me why this is happening?

---

<div class="post-metadata">

**Author:** ![eldy](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/eldy/32/12_2.png) [@eldy](https://www.dolibarr.org/forum/u/eldy)\
**Post date:** [February 8, 2014, 2:58am UTC](https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485/2 "2014-02-08T02:58:11Z")

</div>

Did you try with 3.5 stable instead.

---

<div class="post-metadata">

**Author:** ![JoHe](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/johe/32/6818_2.png) [@JoHe](https://www.dolibarr.org/forum/u/JoHe)\
**Post date:** [October 17, 2014, 5:18pm UTC](https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485/3 "2014-10-17T17:18:41Z")

</div>

Hi

I’m having the same problem in version 3.6.1.

Any ideas?

---

<div class="post-metadata">

**Author:** ![den](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/den/32/354_2.png) [@den](https://www.dolibarr.org/forum/u/den)\
**Post date:** [November 2, 2014, 4:57pm UTC](https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485/4 "2014-11-02T16:57:20Z")

</div>

Hi,

I’m having the same problem and I think I know why.  
The problem is scandir parameter in the url

> [@](#):
>
> /admin/facture.php?action=setmod&value=mod\_facture\_mercure&scandir=&label=

I suppose that your server (and mine too) is blocking any request having scandir parameter for security reasons. To check that just try this url on you domain:

> [@](#):
>
> [yourdomain.com/](http://yourdomain.com/)?scandir

and you should get “Forbidden. You don’t have permission to access / on this server.”

But there is a kind of workaround - remove this parameter from the url and your module will be set!  
Before:

> [@](#):
>
> /admin/facture.php?action=setmod&value=mod\_facture\_mercure&scandir=&label=

After:

> [@](#):
>
> /admin/facture.php?action=setmod&value=mod\_facture\_mercure&label=

As simple as that, if you get Forbidden message just modify you url by removing that parameter and hit enter.  
This should work for any other actions even if they use this parameter like activating Invoice documents models: ODT/ODS

> [@](#):
>
> /admin/facture.php?action=set&value=generic\_invoice\_odt&scandir=FACTURE\_ADDON\_PDF\_ODT\_PATH&label=ODT%2FODS+templates

I know this is annoying but I’m afraid there is nothing you can do about.

---

<div class="post-metadata">

**Author:** ![den](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/den/32/354_2.png) [@den](https://www.dolibarr.org/forum/u/den)\
**Post date:** [November 2, 2014, 6:16pm UTC](https://www.dolibarr.org/forum/t/not-able-to-enable-invoice-numbering-module-in-3-5/10485/5 "2014-11-02T18:16:40Z")

</div>

Well I was wrong about setting Invoice documents models to ODT by removing scandir parameter. It will activate it but you won’t be able to create an ODT Invoice.  
But there is a quick fix for it and actually a permanent fix for that issue:

1. Open /htdocs/admin/facture.php in any text editor ( like Notepad or better Notepad++)
2. Replace this text

`
scandir=`  
with

`
scan_dir=`  
3) Find

`
$scandir = GETPOST('scandir','alpha');`  
and replace it with

`
$scandir = GETPOST('scan_dir','alpha');`  
4) Save the file and reload the page

Unfortunately there are many files using the same parameter so ideally you should do the same steps for these files too:  
/htdocs/admin/commande.php  
/htdocs/admin/contract.php  
/htdocs/admin/dons.php  
/htdocs/admin/expedition.php  
/htdocs/admin/fichinter.php  
/htdocs/admin/livraison.php  
/htdocs/admin/propal.php  
/htdocs/admin/supplier\_invoice.php  
/htdocs/admin/supplier\_order.php  
/htdocs/projet/admin/project.php  
/htdocs/societe/admin/societe.php
