Limits on Uploads

Limits on Uploads

Niko@1966Niko@1966 Posts: 16Questions: 7Answers: 3

This code will only le me upload 62 rows at a time. I have 68 rows in the file and the entire file is 5kb. It is giving me a system error. Do I need to change a setting. Below is the error in the error log and the code.

[29-Jun-2024 17:09:18 UTC] PHP Fatal error: Uncaught PDOException: There is no active transaction in /home/lib_inventory/Database/Query.php:204
Stack trace:

rollBack()">rollBack()" href="#0-/home/lib_inventory/Database/Query.php(204):-PDO->rollBack()">0 /home/lib_inventory/Database/Query.php(204): PDO->rollBack()

1 [internal function]: DataTables\Database\Query::rollback(Object(PDO))

2 /home/lib_inventory/Database.php(314): call_user_func('DataTables\Data...', Object(PDO))

rollback()">rollback()" href="#3-/home/lib_inventory/Editor.php(708):-DataTables\Database->rollback()">3 /home/lib_inventory/Editor.php(708): DataTables\Database->rollback()

process(Array)">process(Array)" href="#4-/home/n/in_process_raw_material_types_import_export.php(122):-DataTables\Editor->process(Array)">4 /home/n/in_process_raw_material_types_import_export.php(122): DataTables\Editor->process(Array)

5 {main}

thrown in /lib_inventory/Database/Query.php on line 204

<?php
/*
 * Example PHP implementation used for the index.html example
 */

// DataTables PHP library
include( "../lib_inventory/DataTables.php" );

// Alias Editor classes so they are easy to use
use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\Validate,
    DataTables\Editor\ValidateOptions;

// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'in_process_raw_material_types' )
    ->fields(
    Field::inst( 'id' ),
    Field::inst( 'type' ),
    Field::inst( 'type_ip' ),
    Field::inst( 'shipped' ),
    Field::inst( 'type_fp' ),
    Field::inst( 'status' ),
    Field::inst( 'usable' ),
    Field::inst( 'expiration_date' ),
    Field::inst( 'ea' ),
    Field::inst( 'bulk' ),
    Field::inst( 'bulk_tabcap' ),
    Field::inst( 'tab_cap' ),
    Field::inst( 'blister' ),
    Field::inst( 'fp' ),
    Field::inst( 'master_case' ),
    Field::inst( 'pallet' ),
    Field::inst( 'primary_marker' ),
    Field::inst( 'primary_tracker' ),
    Field::inst( 'revision' ),
    Field::inst( 'version' ),
    Field::inst( 'order_id' ),
    Field::inst( 'NR' ),
    Field::inst( 'CR' ),
    Field::inst( 'CA' ),
    Field::inst( 'added_by' ),
    Field::inst( 'date_added' ),
    Field::inst( 'new_entry_note' ),
    Field::inst( 'updated_by' ),
    Field::inst( 'date_updated' ),
    Field::inst( 'update_notes' ),
    Field::inst( 'approval_qc1' ),
    Field::inst( 'approved_by_qc1' ),
    Field::inst( 'approved_qc1_date' ),
    Field::inst( 'approval_qc1_comment' ),
    Field::inst( 'approval_qc2' ),
    Field::inst( 'approved_by_qc2' ),
    Field::inst( 'approved_qc2_date' ),
    Field::inst( 'approval_qc2_comment' ),
    Field::inst( 'approval_qc3' ),
    Field::inst( 'approved_by_qc3' ),
    Field::inst( 'approved_qc3_date' ),
    Field::inst( 'approval_qc3_comment' ),
    Field::inst( 'approval_qc4' ),
    Field::inst( 'approved_by_qc4' ),
    Field::inst( 'approved_qc4_date' ),
    Field::inst( 'approval_qc4_comment' ),
    Field::inst( 'approval_qc5' ),
    Field::inst( 'approved_by_qc5' ),
    Field::inst( 'approved_qc5_date' ),
    Field::inst( 'approval_qc5_comment' ),
    Field::inst( 'approval_mfg1' ),
    Field::inst( 'approved_by_mfg1' ),
    Field::inst( 'approved_mfg1_date' ),
    Field::inst( 'approval_mfg1_comment' ),
    Field::inst( 'approval_mfg2' ),
    Field::inst( 'approved_by_mfg2' ),
    Field::inst( 'approved_mfg2_date' ),
    Field::inst( 'approval_mfg2_comment' ),
    Field::inst( 'approval_mfg3' ),
    Field::inst( 'approved_by_mfg3' ),
    Field::inst( 'approved_mfg3_date' ),
    Field::inst( 'approval_mfg3_comment' ),
    Field::inst( 'approval_mfg4' ),
    Field::inst( 'approved_by_mfg4' ),
    Field::inst( 'approved_mfg4_date' ),
    Field::inst( 'approval_mfg4_comment' ),
    Field::inst( 'approval_mfg5' ),
    Field::inst( 'approved_by_mfg5' ),
    Field::inst( 'approved_mfg5_date' ),
    Field::inst( 'approval_mfg5_comment' ),
    Field::inst( 'qc1_revision' ),
    Field::inst( 'qc2_revision' ),
    Field::inst( 'qc3_revision' ),
    Field::inst( 'qc4_revision' ),
    Field::inst( 'qc5_revision' ),
    Field::inst( 'mfg1_revision' ),
    Field::inst( 'mfg2_revision' ),
    Field::inst( 'mfg3_revision' ),
    Field::inst( 'mfg4_revision' ),
    Field::inst( 'mfg5_revision' ),
    Field::inst( 'mfg_approvers_revision' ),
    Field::inst( 'qc_approvers_revision' ),
    Field::inst( 'cid' ),
        Field::inst( 'added_by' )->set( Field::SET_CREATE )
    )
    ->on( 'preCreate', function ( $editor, $values ) {
        $editor
            ->field( 'cid' )
            ->setValue( $_SESSION['update_cid'] );
    } )
    ->on( 'preCreate', function ( $editor, $values ) {
        $editor
            ->field( 'added_by' )
            ->setValue( $_SESSION['username'] );
    })
        ->debug(true)
   ->where( function ( $q ) {
    $q->where( 'cid',$_SESSION['update_cid']);
} )
    ->process( $_POST )
    ->json();

Answers

  • allanallan Posts: 63,488Questions: 1Answers: 10,468 Site admin

    My initial thought is that you might hitting the max_input_vars limit for your PHP configuration. I'd suggest checking what the current value is (use phpinfo() which will tell you that) and then if needed, configure a new value in your php.ini.

    What version of Editor's PHP libraries are you using? There is a check that should be triggered if you are hitting that limit.

    Allan

Sign In or Register to comment.