Self hosted - Softaculous - v5 - unable to save company name, database errors

Hello,

I have installed InvoiceNinja for the first time to one of my VPS servers. I used Softaculous and the installation completed successfully without errors and the app loaded fine with no errors. I filled out the company name info and clicked on Submit to save my changes.

I get a 403 error and then the details of the update query. Any ideas? I need to get this running asap…
Full error output below:

403: {data: {id: VolejRejNm, company_key: QR3vhtgwfyegmejU7H3frzsKYvYJJiIx, update_products: true, fill_products: true, convert_products: false, custom_surcharge_taxes1: false, custom_surcharge_taxes2: false, custom_surcharge_taxes3: false, custom_surcharge_taxes4: false, show_product_cost: false, enable_product_cost: false, show_product_details: true, enable_product_quantity: true, default_quantity: true, custom_fields: {}, size_id: , industry_id: , first_month_of_year: , first_day_of_week: , subdomain: , portal_mode: subdomain, portal_domain: , settings: {auto_archive_invoice: false, lock_invoices: off, enable_client_portal_tasks: false, show_all_tasks_client_portal: invoiced, enable_client_portal_password: false, enable_client_portal: true, enable_client_portal_dashboard: false, signature_on_pdf: false, document_email_attachment: false, portal_design_id: 1, timezone_id: 1, date_format_id: 1, military_time: false, language_id: 1, show_currency_code: false, company_gateway_ids: , currency_id: 1, custom_value1: , custom_value2: , custom_value3: , custom_value4: , default_task_rate: 0, payment_terms: , send_reminders: true, custom_message_dashboard: , custom_message_unpaid_invoice: , custom_message_paid_invoice: , custom_message_unapproved_quote: , auto_archive_quote: false, auto_convert_quote: true, auto_email_invoice: true, entity_send_time: 6, inclusive_taxes: false, quote_footer: , translations: {}, counter_number_applied: when_saved, quote_number_applied: when_saved, invoice_number_pattern: , invoice_number_counter: 1, recurring_invoice_number_pattern: , recurring_invoice_number_counter: 1, quote_number_pattern: , quote_number_counter: 1, client_number_pattern: , client_number_counter: 2, credit_number_pattern: , credit_number_counter: 1, task_number_pattern: , task_number_counter: 1, expense_number_pattern: , expense_number_counter: 1, recurring_expense_number_pattern: , recurring_expense_number_counter: 1, recurring_quote_number_pattern: , recurring_quote_number_counter: 1, vendor_number_pattern: , vendor_number_counter: 1, ticket_number_pattern: , ticket_number_counter: 1, payment_number_pattern: , payment_number_counter: 1, project_number_pattern: , project_number_counter: 1, purchase_order_number_pattern: , purchase_order_number_counter: 1, shared_invoice_quote_counter: false, shared_invoice_credit_counter: false, recurring_number_prefix: , reset_counter_frequency_id: 0, reset_counter_date: , counter_padding: 4, auto_bill: off, auto_bill_date: on_due_date, invoice_terms: , quote_terms: , invoice_taxes: 0, invoice_design_id: Wpmbk5ezJn, quote_design_id: Wpmbk5ezJn, credit_design_id: Wpmbk5ezJn, purchase_order_design_id: Wpmbk5ezJn, purchase_order_footer: , purchase_order_terms: , purchase_order_public_notes: , require_purchase_order_signature: false, invoice_footer: , credit_footer: , credit_terms: , invoice_labels: , tax_name1: , tax_rate1: 0, tax_name2: , tax_rate2: 0, tax_name3: , tax_rate3: 0, payment_type_id: 0, valid_until: , show_accept_invoice_terms: false, show_accept_quote_terms: false, require_invoice_signature: false, require_quote_signature: false, email_sending_method: default, gmail_sending_user_id: 0, reply_to_email: , reply_to_name: , bcc_email: , pdf_email_attachment: false, ubl_email_attachment: false, email_style: light, email_style_custom: , email_subject_invoice: , email_subject_quote: , email_subject_credit: , email_subject_payment: , email_subject_payment_partial: , email_subject_statement: , email_subject_purchase_order: , email_template_purchase_order: , email_template_invoice: , email_template_credit: , email_template_quote: , email_template_payment: , email_template_payment_partial: , email_template_statement: , email_subject_reminder1: , email_subject_reminder2: , email_subject_reminder3: , email_subject_reminder_endless: , email_template_reminder1: , email_template_reminder2: , email_template_reminder3: , email_template_reminder_endless: , email_signature: , enable_email_markup: true, email_subject_custom1: , email_subject_custom2: , email_subject_custom3: , email_template_custom1: , email_template_custom2: , email_template_custom3: , enable_reminder1: false, enable_reminder2: false, enable_reminder3: false, enable_reminder_endless: false, num_days_reminder1: 0, num_days_reminder2: 0, num_days_reminder3: 0, schedule_reminder1: , schedule_reminder2: , schedule_reminder3: , reminder_send_time: 0, late_fee_amount1: 0, late_fee_amount2: 0, late_fee_amount3: 0, late_fee_percent1: 0, late_fee_percent2: 0, late_fee_percent3: 0, endless_reminder_frequency_id: 0, late_fee_endless_amount: 0, late_fee_endless_percent: 0, client_online_payment_notification: true, client_manual_payment_notification: true, name: , company_logo: , website: , address1: , address2: , city: , state: , postal_code: , phone: , email: , country_id: 840, vat_number: , id_number: , page_size: A4, page_layout: portrait, font_size: 7, primary_font: Roboto, secondary_font: Roboto, primary_color: #298AAB, secondary_color: #7081e0, page_numbering: false, page_numbering_alignment: C, hide_paid_to_date: false, embed_documents: false, all_pages_header: false, all_pages_footer: false, pdf_variables: {client_details: [$client.name, $client.number, $client.vat_number, $client.address1, $client.address2, $client.city_state_postal, $client.country, $client.phone, $contact.email], vendor_details: [$vendor.name, $vendor.number, $vendor.vat_number, $vendor.address1, $vendor.address2, $vendor.city_state_postal, $vendor.country, $vendor.phone, $contact.email], purchase_order_details: [$purchase_order.number, $purchase_order.po_number, $purchase_order.date, $purchase_order.due_date, $purchase_order.total, $purchase_order.balance_due], company_details: [$company.name, $company.id_number, $company.vat_number, $company.website, $company.email, $company.phone], company_address: [$company.address1, $company.address2, $company.city_state_postal, $company.country], invoice_details: [$invoice.number, $invoice.po_number, $invoice.date, $invoice.due_date, $invoice.total, $invoice.balance_due], quote_details: [$quote.number, $quote.po_number, $quote.date, $quote.valid_until, $quote.total], credit_details: [$credit.number, $credit.po_number, $credit.date, $credit.balance, $credit.total], product_columns: [$product.item, $product.description, $product.unit_cost, $product.quantity, $product.discount, $product.tax, $product.line_total], task_columns: [$task.service, $task.description, $task.rate, $task.hours, $task.discount, $task.tax, $task.line_total], total_columns: [$net_subtotal, $subtotal, $discount, $custom_surcharge1, $custom_surcharge2, $custom_surcharge3, $custom_surcharge4, $total_taxes, $line_taxes, $total, $paid_to_date, $outstanding], statement_invoice_columns: [$invoice.number, $invoice.date, $due_date, $total, $balance], statement_payment_columns: [$invoice.number, $payment.date, $method, $statement_amount]}, portal_custom_head: , portal_custom_css: , portal_custom_footer: , portal_custom_js: , client_can_register: false, client_portal_terms: , client_portal_privacy_policy: , client_portal_enable_uploads: false, client_portal_allow_under_payment: false, client_portal_under_payment_minimum: 0, client_portal_allow_over_payment: false, use_credits_payment: off, hide_empty_columns_on_pdf: false, email_from_name: , auto_archive_invoice_cancelled: false}, enabled_tax_rates: 0, enabled_modules: 32767, updated_at: 1655931604, archived_at: 0, created_at: 1655474316, slack_webhook_url: , google_analytics_url: , google_analytics_key: , enabled_item_tax_rates: 0, client_can_register: false, is_large: false, is_disabled: false, enable_shop_api: false, mark_expenses_invoiceable: false, mark_expenses_paid: false, invoice_expense_documents: false, invoice_task_timelog: true, auto_start_tasks: false, invoice_task_documents: false, show_tasks_table: false, use_credits_payment: always, default_task_is_date_based: false, enable_product_discount: false, calculate_expense_tax_by_amount: false, hide_empty_columns_on_pdf: false, expense_inclusive_taxes: false, expense_amount_is_pretax: true, oauth_password_required: false, session_timeout: 0, default_password_timeout: 1800000, invoice_task_datelog: true, show_task_end_date: false, markdown_enabled: true, use_comma_as_decimal_place: false, report_include_drafts: false, client_registration_fields: [{key: first_name, required: true}, {key: last_name, required: true}, {key: email, required: true}, {key: phone, required: false}, {key: password, required: true}, {key: name, required: false}, {key: website, required: false}, {key: address1, required: false}, {key: address2, required: false}, {key: city, required: false}, {key: state, required: false}, {key: postal_code, required: false}, {key: country_id, required: false}, {key: custom_value1, required: false}, {key: custom_value2, required: false}, {key: custom_value3, required: false}, {key: custom_value4, required: false}, {key: public_notes, required: false}, {key: vat_number, required: false}], convert_rate_to_client: true, markdown_email_enabled: false, stop_on_unpaid_recurring: false, use_quote_terms_on_conversion: false, stock_notification: true, inventory_notification_threshold: 0, track_inventory: false, enable_applying_payments: false, documents: []}}

Hi,

I suggest using the network tab in the browser to check which URL is being used to reach the API.

Thanks hillel - this is what the network tab shows for the post/error - any ideas about how to troubleshoot further?

PUT https://ninja.our-domain.com/public/index.php/api/v1/companies/VolejRejNm? 403 (Forbidden)
ia @ main.foss.dart.js?v=5.3.100:85695
e5C @ main.foss.dart.js?v=5.3.100:68120
(anonymous) @ main.foss.dart.js?v=5.3.100:151886
(anonymous) @ main.foss.dart.js?v=5.3.100:5762
$2 @ main.foss.dart.js?v=5.3.100:81449
$1 @ main.foss.dart.js?v=5.3.100:81443
Bo @ main.foss.dart.js?v=5.3.100:82660
$0 @ main.foss.dart.js?v=5.3.100:81863
aav @ main.foss.dart.js?v=5.3.100:5898
x9 @ main.foss.dart.js?v=5.3.100:81783
$0 @ main.foss.dart.js?v=5.3.100:81827
eRX @ main.foss.dart.js?v=5.3.100:5930
eWF @ main.foss.dart.js?v=5.3.100:5932
$1 @ main.foss.dart.js?v=5.3.100:81389
f5v @ main.foss.dart.js?v=5.3.100:4648
(anonymous) @ main.foss.dart.js?v=5.3.100:4656
childList (async)
$1 @ main.foss.dart.js?v=5.3.100:81396
efc @ main.foss.dart.js?v=5.3.100:5937
dmo @ main.foss.dart.js?v=5.3.100:6048
wQ @ main.foss.dart.js?v=5.3.100:82668
aaz @ main.foss.dart.js?v=5.3.100:81790
o2 @ main.foss.dart.js?v=5.3.100:81788
am @ main.foss.dart.js?v=5.3.100:81702
fN @ main.foss.dart.js?v=5.3.100:81703
aiS @ main.foss.dart.js?v=5.3.100:124103
e_F @ main.foss.dart.js?v=5.3.100:23472
o0 @ main.foss.dart.js?v=5.3.100:97733
x6 @ main.foss.dart.js?v=5.3.100:97734
p_ @ main.foss.dart.js?v=5.3.100:97712
eC @ main.foss.dart.js?v=5.3.100:97713
HK @ main.foss.dart.js?v=5.3.100:104764
aek @ main.foss.dart.js?v=5.3.100:105042
(anonymous) @ main.foss.dart.js?v=5.3.100:4688
aqp @ main.foss.dart.js?v=5.3.100:100196
iq @ main.foss.dart.js?v=5.3.100:100200
apA @ main.foss.dart.js?v=5.3.100:100532
ab6 @ main.foss.dart.js?v=5.3.100:100504
apx @ main.foss.dart.js?v=5.3.100:100467
rg @ main.foss.dart.js?v=5.3.100:100255
(anonymous) @ main.foss.dart.js?v=5.3.100:4689
aPC @ main.foss.dart.js?v=5.3.100:100157
$2 @ main.foss.dart.js?v=5.3.100:100169
L @ main.foss.dart.js?v=5.3.100:81043
aci @ main.foss.dart.js?v=5.3.100:100164
auq @ main.foss.dart.js?v=5.3.100:100162
rh @ main.foss.dart.js?v=5.3.100:99289
a1s @ main.foss.dart.js?v=5.3.100:99283
a1s @ main.foss.dart.js?v=5.3.100:128060
aeh @ main.foss.dart.js?v=5.3.100:99277
bgU @ main.foss.dart.js?v=5.3.100:99268
WK @ main.foss.dart.js?v=5.3.100:99266
aVZ @ main.foss.dart.js?v=5.3.100:99262
(anonymous) @ main.foss.dart.js?v=5.3.100:4689
b9Y @ main.foss.dart.js?v=5.3.100:1502
b0k @ main.foss.dart.js?v=5.3.100:75723
(anonymous) @ main.foss.dart.js?v=5.3.100:4689
$1 @ main.foss.dart.js?v=5.3.100:75892
$1 @ main.foss.dart.js?v=5.3.100:75862
$1 @ main.foss.dart.js?v=5.3.100:75735
f5v @ main.foss.dart.js?v=5.3.100:4648
(anonymous) @ main.foss.dart.js?v=5.3.100:4656
Show 31 more frames
main.foss.dart.js?v=5.3.100:66363 403: {data: {id: VolejRejNm, company_key:

Thanks! Can you check that mod_rewrite is enabled on the server, you shouldn’t see index.php in the URL. Also, please check the APP_URL is correct in the .env file.

Thanks!

Mod Rewrite appears to be enabled:

[root@ ~]# httpd -M | grep rewrite
rewrite_module (shared)

from the .env file:
APP_URL=“https://ninja.our-domain.com/public

What else would cause the index.php filename to show up if it isn’t expected?

TIA

You may want to setup a phpinfo page to confirm mod_rewrite

@david any thoughts?

Ugh…

I have checked via the command line as root on the server and it indicates that the rewrite_module is enabled. (as per above).

In php info there is not indication that the mod_rewrite is available - I looked for mod_rewrite or RewriteEngine and did not find it in the phpinfo output.

I created a sub directory under public and placed an .htaccess file with RewriteEngine on and then placed phpinfo file in that directory - the phpinfo page worked fine, and the .htaccess file did not throw any errors - from what I understand if the rewrite module was not available for that site/directory I would have received a script/module error - is that so?

It is worth noting that I am able to create clients, invoices and other functions within the app - but for some reason the Company Name, language and Currency setup is where there is an issue. Is there something in the Cron settings I need to check that could affect this?

TIA

@itoutfitters

Can you try one thing please.

Open your browser console and then try to update the company name. In the network tab, see if this particular action is returning an error, you can inspect the error directly and advise.

Thanks David,

Here is the console log from fresh site reload to submission of the prompt for company name.

main.foss.dart.js?v=5.3.100:66363 Flutter Web Bootstrap: Auto
main.foss.dart.js?v=5.3.100:66363 POST: https://ninja.mydomain.com/public/index.php/api/v1/refresh?&first_load=true&include_static=true
main.foss.dart.js?v=5.3.100:66363 POST: https://ninja.mydomain.com/public/index.php/api/v1/refresh?&first_load=true&include_static=true
main.foss.dart.js?v=5.3.100:66363 ## Confirm password: false, true, false, true, false
main.foss.dart.js?v=5.3.100:66363 ## 3
main.foss.dart.js?v=5.3.100:66363 PUT: https://ninja.mydomain.com/public/index.php/api/v1/companies/VolejRejNm?
main.foss.dart.js?v=5.3.100:85695 PUT https://ninja.mydomain.com/public/index.php/api/v1/companies/VolejRejNm? 403 (Forbidden)
ia @ main.foss.dart.js?v=5.3.100:85695
e5C @ main.foss.dart.js?v=5.3.100:68120
(anonymous) @ main.foss.dart.js?v=5.3.100:151886
(anonymous) @ main.foss.dart.js?v=5.3.100:5762
$2 @ main.foss.dart.js?v=5.3.100:81449
$1 @ main.foss.dart.js?v=5.3.100:81443
Bo @ main.foss.dart.js?v=5.3.100:82660
$0 @ main.foss.dart.js?v=5.3.100:81863
aav @ main.foss.dart.js?v=5.3.100:5898
x9 @ main.foss.dart.js?v=5.3.100:81783
$0 @ main.foss.dart.js?v=5.3.100:81827
eRX @ main.foss.dart.js?v=5.3.100:5930
eWF @ main.foss.dart.js?v=5.3.100:5932
$1 @ main.foss.dart.js?v=5.3.100:81389
f5v @ main.foss.dart.js?v=5.3.100:4648
(anonymous) @ main.foss.dart.js?v=5.3.100:4656
childList (async)
$1 @ main.foss.dart.js?v=5.3.100:81396
efc @ main.foss.dart.js?v=5.3.100:5937
dmo @ main.foss.dart.js?v=5.3.100:6048
wQ @ main.foss.dart.js?v=5.3.100:82668
aaz @ main.foss.dart.js?v=5.3.100:81790
o2 @ main.foss.dart.js?v=5.3.100:81788
am @ main.foss.dart.js?v=5.3.100:81702
fN @ main.foss.dart.js?v=5.3.100:81703
aiS @ main.foss.dart.js?v=5.3.100:124103
e_F @ main.foss.dart.js?v=5.3.100:23472
o0 @ main.foss.dart.js?v=5.3.100:97733
x6 @ main.foss.dart.js?v=5.3.100:97734
p_ @ main.foss.dart.js?v=5.3.100:97712
eC @ main.foss.dart.js?v=5.3.100:97713
HK @ main.foss.dart.js?v=5.3.100:104764
aek @ main.foss.dart.js?v=5.3.100:105042
(anonymous) @ main.foss.dart.js?v=5.3.100:4688
aqp @ main.foss.dart.js?v=5.3.100:100196
iq @ main.foss.dart.js?v=5.3.100:100200
apA @ main.foss.dart.js?v=5.3.100:100532
ab6 @ main.foss.dart.js?v=5.3.100:100504
apx @ main.foss.dart.js?v=5.3.100:100467
rg @ main.foss.dart.js?v=5.3.100:100255
(anonymous) @ main.foss.dart.js?v=5.3.100:4689
aPC @ main.foss.dart.js?v=5.3.100:100157
$2 @ main.foss.dart.js?v=5.3.100:100169
L @ main.foss.dart.js?v=5.3.100:81043
aci @ main.foss.dart.js?v=5.3.100:100164
auq @ main.foss.dart.js?v=5.3.100:100162
rh @ main.foss.dart.js?v=5.3.100:99289
a1s @ main.foss.dart.js?v=5.3.100:99283
a1s @ main.foss.dart.js?v=5.3.100:128060
aeh @ main.foss.dart.js?v=5.3.100:99277
bgU @ main.foss.dart.js?v=5.3.100:99268
WK @ main.foss.dart.js?v=5.3.100:99266
aVZ @ main.foss.dart.js?v=5.3.100:99262
(anonymous) @ main.foss.dart.js?v=5.3.100:4689
b9Y @ main.foss.dart.js?v=5.3.100:1502
b0k @ main.foss.dart.js?v=5.3.100:75723
(anonymous) @ main.foss.dart.js?v=5.3.100:4689
$1 @ main.foss.dart.js?v=5.3.100:75892
$1 @ main.foss.dart.js?v=5.3.100:75862
$1 @ main.foss.dart.js?v=5.3.100:75735
f5v @ main.foss.dart.js?v=5.3.100:4648
(anonymous) @ main.foss.dart.js?v=5.3.100:4656
Show 31 more frames
main.foss.dart.js?v=5.3.100:66363 403: {data: {id: VolejRejNm, company_key: QR3vhtgwfyegmejU7H3frzsKYvYJJiIx, update_products: true, fill_products: true, convert_products: false, custom_surcharge_taxes1: false, custom_surcharge_taxes2: false, custom_surcharge_taxes3: false, custom_surcharge_taxes4: false, show_product_cost: false, enable_product_cost: false, show_product_details: true, enable_product_quantity: true, default_quantity: true, custom_fields: {}, size_id: , industry_id: , first_month_of_year: , first_day_of_week: , subdomain: , portal_mode: subdomain, portal_domain: , settings: {auto_archive_invoice: false, lock_invoices: off, enable_client_portal_tasks: false, show_all_tasks_client_portal: invoiced, enable_client_portal_password: false, enable_client_portal: true, enable_client_portal_dashboard: false, signature_on_pdf: false, document_email_attachment: false, portal_design_id: 1, timezone_id: 1, date_format_id: 1, military_time: false, language_id: 1, show_currency_code: false, company_gateway_ids: , currency_id: 1, custom_value1: , custom_value2: , custom_value3: , custom_value4: , default_task_rate: 0, payment_terms: , send_reminders: true, custom_message_dashboard: , custom_message_unpaid_invoice: , custom_message_paid_invoice: , custom_message_unapproved_quote: , auto_archive_quote: false, auto_convert_quote: true, auto_email_invoice: true, entity_send_time: 6, inclusive_taxes: false, quote_footer: , translations: {}, counter_number_applied: when_saved, quote_number_applied: when_saved, invoice_number_pattern: , invoice_number_counter: 1, recurring_invoice_number_pattern: , recurring_invoice_number_counter: 1, quote_number_pattern: , quote_number_counter: 1, client_number_pattern: , client_number_counter: 3, credit_number_pattern: , credit_number_counter: 1, task_number_pattern: , task_number_counter: 1, expense_number_pattern: , expense_number_counter: 1, recurring_expense_number_pattern: , recurring_expense_number_counter: 1, recurring_quote_number_pattern: , recurring_quote_number_counter: 1, vendor_number_pattern: , vendor_number_counter: 1, ticket_number_pattern: , ticket_number_counter: 1, payment_number_pattern: , payment_number_counter: 1, project_number_pattern: , project_number_counter: 2, purchase_order_number_pattern: , purchase_order_number_counter: 1, shared_invoice_quote_counter: false, shared_invoice_credit_counter: false, recurring_number_prefix: , reset_counter_frequency_id: 0, reset_counter_date: , counter_padding: 4, auto_bill: off, auto_bill_date: on_due_date, invoice_terms: , quote_terms: , invoice_taxes: 0, invoice_design_id: Wpmbk5ezJn, quote_design_id: Wpmbk5ezJn, credit_design_id: Wpmbk5ezJn, purchase_order_design_id: Wpmbk5ezJn, purchase_order_footer: , purchase_order_terms: , purchase_order_public_notes: , require_purchase_order_signature: false, invoice_footer: , credit_footer: , credit_terms: , invoice_labels: , tax_name1: , tax_rate1: 0, tax_name2: , tax_rate2: 0, tax_name3: , tax_rate3: 0, payment_type_id: 0, valid_until: , show_accept_invoice_terms: false, show_accept_quote_terms: false, require_invoice_signature: false, require_quote_signature: false, email_sending_method: default, gmail_sending_user_id: 0, reply_to_email: , reply_to_name: , bcc_email: , pdf_email_attachment: false, ubl_email_attachment: false, email_style: light, email_style_custom: , email_subject_invoice: , email_subject_quote: , email_subject_credit: , email_subject_payment: , email_subject_payment_partial: , email_subject_statement: , email_subject_purchase_order: , email_template_purchase_order: , email_template_invoice: , email_template_credit: , email_template_quote: , email_template_payment: , email_template_payment_partial: , email_template_statement: , email_subject_reminder1: , email_subject_reminder2: , email_subject_reminder3: , email_subject_reminder_endless: , email_template_reminder1: , email_template_reminder2: , email_template_reminder3: , email_template_reminder_endless: , email_signature: , enable_email_markup: true, email_subject_custom1: , email_subject_custom2: , email_subject_custom3: , email_template_custom1: , email_template_custom2: , email_template_custom3: , enable_reminder1: false, enable_reminder2: false, enable_reminder3: false, enable_reminder_endless: false, num_days_reminder1: 0, num_days_reminder2: 0, num_days_reminder3: 0, schedule_reminder1: , schedule_reminder2: , schedule_reminder3: , reminder_send_time: 0, late_fee_amount1: 0, late_fee_amount2: 0, late_fee_amount3: 0, late_fee_percent1: 0, late_fee_percent2: 0, late_fee_percent3: 0, endless_reminder_frequency_id: 0, late_fee_endless_amount: 0, late_fee_endless_percent: 0, client_online_payment_notification: true, client_manual_payment_notification: true, name: , company_logo: , website: , address1: , address2: , city: , state: , postal_code: , phone: , email: , country_id: 840, vat_number: , id_number: , page_size: A4, page_layout: portrait, font_size: 7, primary_font: Roboto, secondary_font: Roboto, primary_color: #298AAB, secondary_color: #7081e0, page_numbering: false, page_numbering_alignment: C, hide_paid_to_date: false, embed_documents: false, all_pages_header: false, all_pages_footer: false, pdf_variables: {client_details: [$client.name, $client.number, $client.vat_number, $client.address1, $client.address2, $client.city_state_postal, $client.country, $client.phone, $contact.email], vendor_details: [$vendor.name, $vendor.number, $vendor.vat_number, $vendor.address1, $vendor.address2, $vendor.city_state_postal, $vendor.country, $vendor.phone, $contact.email], purchase_order_details: [$purchase_order.number, $purchase_order.po_number, $purchase_order.date, $purchase_order.due_date, $purchase_order.total, $purchase_order.balance_due], company_details: [$company.name, $company.id_number, $company.vat_number, $company.website, $company.email, $company.phone], company_address: [$company.address1, $company.address2, $company.city_state_postal, $company.country], invoice_details: [$invoice.number, $invoice.po_number, $invoice.date, $invoice.due_date, $invoice.total, $invoice.balance_due], quote_details: [$quote.number, $quote.po_number, $quote.date, $quote.valid_until, $quote.total], credit_details: [$credit.number, $credit.po_number, $credit.date, $credit.balance, $credit.total], product_columns: [$product.item, $product.description, $product.unit_cost, $product.quantity, $product.discount, $product.tax, $product.line_total], task_columns: [$task.service, $task.description, $task.rate, $task.hours, $task.discount, $task.tax, $task.line_total], total_columns: [$net_subtotal, $subtotal, $discount, $custom_surcharge1, $custom_surcharge2, $custom_surcharge3, $custom_surcharge4, $total_taxes, $line_taxes, $total, $paid_to_date, $outstanding], statement_invoice_columns: [$invoice.number, $invoice.date, $due_date, $total, $balance], statement_payment_columns: [$invoice.number, $payment.date, $method, $statement_amount]}, portal_custom_head: , portal_custom_css: , portal_custom_footer: , portal_custom_js: , client_can_register: false, client_portal_terms: , client_portal_privacy_policy: , client_portal_enable_uploads: false, client_portal_allow_under_payment: false, client_portal_under_payment_minimum: 0, client_portal_allow_over_payment: false, use_credits_payment: off, hide_empty_columns_on_pdf: false, email_from_name: , auto_archive_invoice_cancelled: false}, enabled_tax_rates: 0, enabled_modules: 32767, updated_at: 1656646531, archived_at: 0, created_at: 1655474316, slack_webhook_url: , google_analytics_url: , google_analytics_key: , enabled_item_tax_rates: 0, client_can_register: false, is_large: false, is_disabled: false, enable_shop_api: false, mark_expenses_invoiceable: false, mark_expenses_paid: false, invoice_expense_documents: false, invoice_task_timelog: true, auto_start_tasks: false, invoice_task_documents: false, show_tasks_table: false, use_credits_payment: always, default_task_is_date_based: false, enable_product_discount: false, calculate_expense_tax_by_amount: false, hide_empty_columns_on_pdf: false, expense_inclusive_taxes: false, expense_amount_is_pretax: true, oauth_password_required: false, session_timeout: 0, default_password_timeout: 1800000, invoice_task_datelog: true, show_task_end_date: false, markdown_enabled: true, use_comma_as_decimal_place: false, report_include_drafts: false, client_registration_fields: [{key: first_name, required: true}, {key: last_name, required: true}, {key: email, required: true}, {key: phone, required: false}, {key: password, required: true}, {key: name, required: false}, {key: website, required: false}, {key: address1, required: false}, {key: address2, required: false}, {key: city, required: false}, {key: state, required: false}, {key: postal_code, required: false}, {key: country_id, required: false}, {key: custom_value1, required: false}, {key: custom_value2, required: false}, {key: custom_value3, required: false}, {key: custom_value4, required: false}, {key: public_notes, required: false}, {key: vat_number, required: false}], convert_rate_to_client: true, markdown_email_enabled: false, stop_on_unpaid_recurring: false, use_quote_terms_on_conversion: false, stock_notification: true, inventory_notification_threshold: 0, track_inventory: false, enable_applying_payments: false, documents: []}}

From the log file it is clear that the second PUT throws a 403 forbidden error - although I am not sure why. hillel suggested that this should not call index.php at all.

I am hoping you guys might understand what is going on - thanks in advance for your help!

If you don’t see mod_rewrite enabled in the phpinfo page then it isn’t enabled for the app.

Maybe the info here will help:

https://laracasts.com/discuss/channels/laravel/remove-indexphp-from-url

Thx hillel,

I am pretty sure mod_rewrite is enabled and running (command line checks above and successful processing of the .htaccess without error.

I read that thread you referenced above - although I am not sure which part you suggest is applicable to my InvoiceNinja install since the content seems to be generally about laravel and not specifically InvoiceNinja.

Surely there is some better way to troubleshoot this issue?

Are either of you available to help me resolve this and get it working?

TIA

Keith Waldron

As far as I’m aware if mod_rewrite isn’t in the phpinfo page it isn’t enabled.

@david do you have suggestions?

I think perhaps with my cPanel WHM install of Fast Apache mod_rewrite is compiled by default into apache. I have WordPress and other sites running perfectly well under the same setup. I can’t say for sure though but I have read where mod_rewrite in some circumstances will not be displayed as a module under php and phpinfo because it is compiled into apache (thereby exposing the functionality through the apache engine and not the php engine…

Regardless, I would love to get this resolved, I suspect it will end up being something fairly straightforward - is there any scripts available that can complete a dependency/compatibility check?

If you are available to dig deeper out of public channel I can pay for your services.

TIA

Not that I’m aware of.

I suggest reaching out to your webhost to see if they have any advice about mod_rewrite.

David may have some other ideas…

The web host does not have any additional help - the server itself is completely managed by me and my staff, and the cPanel running is fairly standardized.

Hopefully David (or someone) will have a chance to chime in here and help pull a rabbit from the hat :slightly_smiling_face:

@itoutfitters

I think @hillel is on the right track here, I don’t think the system should be rewriting index.php into the URL at all. I haven’t seen that before, but I think it may be the clue you need.

thanks david!

OK - so if I take that clue - can you help me follow the process through so that I can determine where this falls down?

I get no script errors related to loading the .htaccess file - can I conclude then that the mod_rewrite is functioning? Is there a way to test this? (my php info output does not list apache modules as it did with earlier versions).