Question: Script not working in fresh installation

Script not working in fresh installation

I have done some fresh installation with PHP 7.0, 7.2 & 7.4 and it's not working at all. It lets me install it with no problems but then I cannot save any settings (including changing langua

DD

Daniel Díaz

Asked
I have done some fresh installation with PHP 7.0, 7.2 & 7.4 and it's not working at all. It lets me install it with no problems but then I cannot save any settings (including changing language, main currency...), it doesnt appear any errors.

If I create a product and then I create a sale, it doesnt let me find the product, sending me this error in ajax's response:

Call to a member function num_rows() on boolean

Filename: /home/daniel0diiaz/domains/des.danieldiaz.site/public_html/app/models/admin/Sales_model.php

Line Number: 449
  • MS

    Mian Saleem

    Answered
    Hello,

    Please checked the server requirements in the documentation.pdf that is included in your download file. Please pay attention on the `MySQL` mode `only_full_group_by` It should be disabled.

    Lastly, please check your server error logs and let me know the error details so that I can suggest.

    Thank you
  • DD

    Daniel Díaz

    Answered
    Yeah, products' problem were because of only_full_group_by. But still cant save any settings. I don't get any errors, it's just the update query in Settings_model.php which returns false and doesnt update at all:

    public function updateSetting($data)
    {
    $this->db->where('setting_id', '1');
    if ($this->db->update('settings', $data)) { // this line returns false
    return true;
    }

    return false;
    }

    Thanks u very much
  • DD

    Daniel Díaz

    Answered
    I have dumped post data and it shows the form's data. I dont know if there is some null valued index which shouldnt be null because of the database arch:

    Array
    (
    [site_name] => Test siute
    [rows_per_page] => 10
    [dateformat] => 5
    [timezone] => Europe/Madrid
    [mmode] => 0
    [iwidth] => 800
    [iheight] => 800
    [twidth] => 150
    [theight] => 150
    [watermark] => 0
    [accounting_method] => 0
    [default_email] => [email protected]
    [language] => spanish
    [default_warehouse] => 1
    [default_tax_rate] => 1
    [default_tax_rate2] => 1
    [sales_prefix] => SALE
    [quote_prefix] => QUOTE
    [purchase_prefix] => PO
    [transfer_prefix] => TR
    [delivery_prefix] => DO
    [payment_prefix] => IPAY
    [ppayment_prefix] => POP
    [qa_prefix] =>
    [return_prefix] => SR
    [returnp_prefix] => PR
    [expense_prefix] =>
    [auto_detect_barcode] => 1
    [theme] => default
    [product_serial] => 1
    [customer_group] => 1
    [product_expiry] => 0
    [product_discount] => 1
    [default_currency] => EUR
    [bc_fix] => 4
    [tax1] => 1
    [tax2] => 1
    [overselling] => 0
    [reference_format] => 2
    [racks] => 1
    [attributes] => 1
    [restrict_calendar] => 0
    [captcha] => 0
    [item_addition] => 0
    [protocol] => mail
    [mailpath] => /usr/sbin/sendmail
    [smtp_host] => pop.gmail.com
    [smtp_user] => [email protected]
    [smtp_port] => 25
    [smtp_crypto] =>
    [decimals] => 2
    [decimals_sep] => .
    [thousands_sep] => ,
    [default_biller] => 3
    [invoice_view] => 0
    [rtl] => 0
    [each_spent] =>
    [ca_point] =>
    [each_sale] =>
    [sa_point] =>
    [sac] => 0
    [qty_decimals] => 2
    [display_all_products] => 0
    [display_symbol] => 0
    [symbol] =>
    [remove_expired] => 0
    [barcode_separator] => -
    [set_focus] => 0
    [disable_editing] => 90
    [price_group] => 1
    [barcode_img] => 1
    [update_cost] => 0
    [apis] => 0
    [pdf_lib] => dompdf
    [state] => AN
    [use_code_for_slug] => 0
    [smtp_pass] => jEFTM4T63AiQ9dsidxhPKt9CIg4HQjCN58n/RW9vmdC/UDXCzRLR469ziZ0jjpFlbOg43LyoSmpJLBkcAHh0Yw==
    )
  • MS

    Mian Saleem

    Answered
    Please share the site link and owner account credentials in private reply. Thank you
  • DD

    Daniel Díaz

    Answered
    https://danieldiaz.site/pos/login
    user: [email protected]
    pass: 12345678

    Just tell me if you need development enviorenment. Thanks very much
  • MS

    Mian Saleem

    Answered
    I can't access the site here :(
  • DD

    Daniel Díaz

    Answered
    **[Mian Saleem](/u/saleem)** What error u getting? I have just tried and it's working for me. Maybe a server crash in that time. Could you try again? Thanks
  • DD

    Daniel Díaz

    Answered
    **[Mian Saleem](/u/saleem)** I have just seen that the only page which is not working is the ecommerce shop. I dont know why it stopped working, but you can log in the admin url: https://danieldiaz.site/pos/admin ; same credentials: [email protected] 12345678

    I am installing the new version in an instance in google cloud so that I can check in a fresh enviorenment. I will bring news
  • MS

    Mian Saleem

    Answered
    Hello,

    I am sorry there was issue with database for new installs and was fixed yesterday. Please perform fresh install or just run the query below to

    ```sql
    ALTER TABLE `sma_settings` ADD `use_code_for_slug` TINYINT(1) NULL DEFAULT NULL;
    ```

    I hope this will fix the issue with settings update.
  • DD

    Daniel Díaz

    Answered
    I installed new version in a new vps and it's working good. I supposed it was due to new version, but I also wanted to install in a fresh vps installation. Thanks very much!
  • Login to Reply