Document creation fails to register although file is uploaded

Hi
This is my first post and I’m starting with SuiteCRM so please bear with me.

Running SuiteCRM 7.11.15 on CentOS 8.2.2004 with standard Virtualmin 6.12 install and all updates.
PHP 7.4.7

I have successfully created accounts, contacts, cases and created documents attached to cases.

Now I have one document (PDF about 1MB) which fails to show in the case. It’s the same if I just create a document in Documents.
I have created larger and smaller documents, also PDF, DOCx, XLSx etc. and all went well.

In this failing case:

  • the file is uploaded to the upload directory and given the name 138615c6-f21d-c9b4-8721-5f5999acc68b
  • a new row in document_revisions table is created with
    id: 138615c6-f21d-c9b4-8721-5f5999acc68b
    document_id: 12e787eb-7f44-4a3b-9d63-5f5999a883c4
  • no new row is created in the document table, nor in the document_cases table.

I have looked in the logs, but despite setting DEBUG for the log level (Admin>System Settings>Logger Settings: DEBUG) the log has nothing for the time of the incident and has, apparently, only the cron job entries.
The PHP log has nothing past its startup entries.

It’s hard to see why it is just htis one PDF document, since the file upload succeeded, and I would assume SuiteCRM doesn’t care about its content.
I changed the original filename to ABC.pdf see if it objected to any characters but the name only had A-Z, 0-9, hyphen, space and underscore.
The problem exists for the admin user (1) as well as normal users.

Any help or advice I should be looking for would be most welcome.
Thanks

Hi, welcome to the Community! :tada:

PHP 7.4 is not supported, I’d start by downgrading that to 7.3 and seeing if it changes anything.

Also, in Admin / Diagnostics download your phpinfo to see your effective values for max_upload_size, max_post_size. Also, while you’re there, check your error_log entry to make sure you’re looking at the correct PHP log. I’m almost sure you must have messages in your PHP log…

Many thanks for your guidance.
When I change PHP from 7.4.7 to 7.3.22 (remi) I get a Fatal error:
Fatal error : Uncaught Error: Call to undefined function mysqli_connect() in /home/casavista/public_html/SuiteCRM/include/database/MysqliManager.php:316 Stack trace: #0 /home/casavista/public_html/SuiteCRM/include/database/DBManagerFactory.php(150): MysqliManager->connect(Array, true) #1 /home/casavista/public_html/SuiteCRM/include/entryPoint.php(182): DBManagerFactory::getInstance() #2 /home/casavista/public_html/SuiteCRM/index.php(47): require_once(’/home/casavista…’) #3 {main} thrown in /home/casavista/public_html/SuiteCRM/include/database/MysqliManager.php on line 316

Maybe I need to do more than just change the version?

In pgpinfo my upload_max_filesize is 20M and post_max_size is 8M, so much larger than this file (which is uploaded correctly). And I can create any other document!

SURPRISE. Just before I click to post this reply I logged out and in again and I can now create the document using the “problem” file.
Meantime I had used Virtualmin to change PHP from 7.4 to 7.3 (fail, see above) and back to 7.4.

So the problem has gone away - so long as I stay on PHP 7.4

But thanks so much for your quick reply and help. And I’ve also got much benefit from your website articles. Now I’ve got to get on to why my Webmin Let’s Encrypt certificate won’t renew. Always things to do in lockdown.

Glad to see the issue appears to be resolved, it’s really recommended that you avoid 7.4 for now as there no doubtably will be a collection of issues which are going unseen, also helps while debugging as you don’t have to worry bout PHP being the cause of your issue.

All the best :+1:

The problem you had with 7.3 is likely just because 7.3 uses a different php.ini than 7.4, and there’s some misconfiguration there (MySQL driver).

1 Like