Home Forums Support Recurring invoices and reminder emails (SELF HOST)

This topic contains 6 replies, has 3 voices, and was last updated by  SaSAX 3 weeks, 4 days ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12326

    SaSAX
    Participant

    Why this error?

    I have to install some php connector for mysql?

    [email protected]:~# php70 /volume1/web/ninja/artisan ninja:send-invoices
    Tue, 06 Mar 2018 14:47:32 +0000 Running SendRecurringInvoices...
    
                                                                                                                                     
      [Illuminate\Database\QueryException]                                                                                           
      could not find driver (SQL: select * from <code>accounts</code> where <code>reset_counter_frequency_id</code> > 0 and <code>accounts</code>.<code>deleted_at</code> is null order by <code>id</code> asc)                                                                                                          
                                                                                                                                     
    
                                           
      [Doctrine\DBAL\Driver\PDOException]  
      could not find driver                
                                           
    
                             
      [PDOException]         
      could not find driver
    [email protected]:~# php70 /volume1/web/ninja/artisan ninja:send-reminders
    Tue, 06 Mar 2018 14:52:11 +0000 Running SendReminders...
    
                                                                                                                                     
      [Illuminate\Database\QueryException]                                                                                           
      could not find driver (SQL: select * from 'accounts' where exists (select * from 'account_email_settings' where 'account_emai  
      l_settings'.'account_id' = 'accounts'.'id' and ('late_fee1_amount' > 0 or 'late_fee1_percent' > 0 or 'late_fee2_amount' > 0 o  
      r 'late_fee2_percent' > 0 or 'late_fee3_amount' > 0 or 'late_fee3_percent' > 0)) and 'accounts'.'deleted_at' is null)        
                                                                                                                                     
    
                                           
      [Doctrine\DBAL\Driver\PDOException]  
      could not find driver                
                                           
    
                             
      [PDOException]         
      could not find driver   

    Thanks in advance.

    #12327

    Hillel Coren
    Keymaster

    Maybe this will help: https://stackoverflow.com/a/39032429

    #12328

    SaSAX
    Participant

    Enabling extensions in PHP CLI on a synology DS

    This guide shows how to enable extensions in PHP CLI (command line interface).

    Check your php ini location

    php --ini
    Change to the folder to where the php.ini is located given by the previous command which was in my case

    /usr/local/etc/php70/php.ini
    Use vi to edit the file

    sudo vi php.ini
    Change the extension dir path in php.ini to /volume1/@appstore/PHP7.0/usr/local/lib/php70/modules. Depending on your PHP version the location might differ.

    Enable the extension by adding the following code line to your php.ini. Here’s an example showing how to enable PDO_mysql support.

    extension = pdo_mysql.so
    I had to the correct php executable. In my case it was located under

    /volume1/@appstore/PHP7.0/usr/local/bin

    There is no restart of any kind necessary to make this work as php.ini is initialised on every start when using PHP CLI. If you want to enable the extension on your webserver you have to to use the DSM settings for webstation to do it.

    Now it’s working.

    [email protected]:~# php70 /volume1/web/ninja/artisan ninja:send-invoices
    Tue, 06 Mar 2018 20:38:19 +0000 Running SendRecurringInvoices...
    0 recurring invoice(s) found
    0 due recurring invoice instance(s) found
    0 recurring expenses(s) found
    Tue, 06 Mar 2018 20:38:19 +0000 Done
    [email protected]:~# php70 /volume1/web/ninja/artisan ninja:send-reminders
    Tue, 06 Mar 2018 20:38:44 +0000 Running SendReminders...
    0 accounts found with fees
    1 accounts found with reminders
    TecnoMur Sistemas: 0 invoices found
    TecnoMur Sistemas: 0 endless invoices found
    0 scheduled reports
    Loading latest exchange rates...
    Done
    #12331

    Hillel Coren
    Keymaster

    Great to hear it’s working, thanks for sharing the solution!

    #22309

    SaSAX
    Participant

    PHP 7.3 error at reminders.

    [email protected]:/# php73 /volume1/web/ninja/artisan ninja:send-reminders
    Sat, 26 Oct 2019 17:37:28 +0000 Running SendReminders…
    Sat, 26 Oct 2019 17:37:28 +0000 0 due recurring invoice instance(s) found

    In Builder.php line 1229:

    compact(): Undefined variable: operator

    [email protected]:/# php72 /volume1/web/ninja/artisan ninja:send-reminders
    Sat, 26 Oct 2019 17:37:55 +0000 Running SendReminders…
    Sat, 26 Oct 2019 17:37:55 +0000 0 due recurring invoice instance(s) found
    Sat, 26 Oct 2019 17:37:55 +0000 0 accounts found with fees enabled
    Sat, 26 Oct 2019 17:37:55 +0000 1 accounts found with reminders enabled
    Sat, 26 Oct 2019 17:37:55 +0000 TecnoMur Sistemas: 0 invoices found
    Sat, 26 Oct 2019 17:37:55 +0000 TecnoMur Sistemas: 0 endless invoices found
    Sat, 26 Oct 2019 17:37:55 +0000 0 scheduled reports
    Sat, 26 Oct 2019 17:37:56 +0000 Done

    #22310

    Titanfail
    Participant

    You might want to try reverting to PHP7.2, as 7.3 isn’t currently supported. I think Invoice Ninja 4.5.15 will support it, but they haven’t done a public release of the new version yet.

    #22311

    SaSAX
    Participant

    I downloaded the github 4.5.15 version, but I didn’t know it was still under test. I have returned to the previous one. Thanks for the reply. Greetings.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Posted in: