Using php mysqli apis in nextcloud

This is a development question for a files_external application.

I am trying to access my own mysql database in my files_external application. Since the database is separate from the nextcloud database, I am trying to use the php msqli functions. Unfortunately, I do not seem to be able to use these APIs from within a nextcloud application.
Every time I try to use the mysqli api [$mysqli = new mysqli();] I get the following error from Nextcloud:
“Exception”:“Error”,“Message”:“Class ‘OCA\Files_External\Lib\Storage\mysqli’ not found”,“Code”:0,
It seems like Nextcloud is trying to dynamically load the mysqli subsystem even though I have it properly installed and enabled within php. phpinfo() shows the mysqli subsystem is loaded and available.
Is there something special I need to get Nextcloud to recognize the php mysqli subsystem?

1 Like