Large .PDF Files Not Uploading To MySQL Database as Medium BLOB Via PHP, Files under 2MB Work Fine

后端 未结 5 1614
温柔的废话
温柔的废话 2021-01-03 05:14

I am developing a PHP script for uploading .PDF documents as medium BLOBs into a MySQL database via PHP. The script also allows users to search for files and open/download

5条回答
  •  甜味超标
    2021-01-03 05:32

    I actually fixed the issue. I changed all of the values that were recommended here in php.ini and my.cnf but I also needed to change a setting for PDO.

    I changed: PDO::MYSQL_ATTR_MAX_BUFFER_SIZE (integer) Maximum buffer size. Defaults to 1 MiB.

    This has to be set when the PDO object is created to work though. All is good now.

提交回复
热议问题