Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter knortonff

    (@knortonff)

    OK, I corrected the $file variable name and did some more investigating and made sure fileinfo is enabled in php.ini and now I am getting a different error.

    Error on upload page: There is something wrong with the file you tried to upload. Try another.

    Log File Errors:
    [05/24/24 7:13pm UTC] Undefined variable $i in C:\inetpub\wwwroot\wp-content\plugins\participants-database\classes\PDb_File_Uploads.php on line 104
    [05/24/24 7:13pm UTC] String offset cast occurred in C:\inetpub\wwwroot\wp-content\plugins\participants-database\classes\PDb_File_Uploads.php on line 104

    This is how my Line 104 currently looks:
    if ( filesize( realpath( $file[ ‘tmp_name’ ][ $i ] ) ) > ini_get( ‘upload_max_filesize’ ) ) {

    Thank You,

    Thread Starter knortonff

    (@knortonff)

    I can tell the plug-in is getting the upload_max_filesize from PHP as I have edited it to see if the error message changed to match the changes I made the php.ini setting.

    Is it possible to hardcode the check value in the PDb_File_Uploads.php so it doesn’t reference the upload_max_filesize and just uses a hard coded value (which will be below upload_max_filesize) so it uploads the file correctly?

    Or am I barking up the wrong tree here and its not the upload_max_filesize value that is causing the error but something else? This is running on an IIS server I manage, so I have access to change anything needed to be changed.

    Thank You!

Viewing 2 replies - 1 through 2 (of 2 total)