igittigitt / dokuwiki-plugin-sqlcomp

Dokuwiki plugin to query SQL databases and show result as tables
0 stars 2 forks source link

Getting This Database Type is not yet Supported with Oracle #3

Open paulohdscoelho opened 6 years ago

paulohdscoelho commented 6 years ago

I'm trying to use the plugin in a Dokuwiki based on Ubuntu Server with Oracle DB and PHP-7.0. I've installed the php_oci8 extension but still I'm getting the "This Database Type is not yet Supported with Oracle"' error when trying to connect.

igittigitt commented 6 years ago

Yes, you're right :-( It's because of this:

    private function _oracle($Server,$User,$Pass,$Database,$Query){
          throw new Exception($this->aString["nohandler"]);
    }

As you can see, connecting to an Oracle database was never been supported by SQLCOMP. You should know that i inherit this class because it was orphaned. So it's not my intellectual property and so i do not know if the original author has ever done any efforts to make this work with Oracle.

But doing so shoul'nt be too hard. SQLCOMP uses plain arrays "inside", it's just the connect and retrieve/store which is driver dependant. Using "oci_connect ( string $username , string $password [, string $connection_string [, string $character_set [, int $session_mode ]]] )" should help. You are welcome to contribute this part.

To get Oracle working you also need the Oracle-Client installed on your host and a valid "tnsnames.ora" file.