yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

Can't use standard DSN to connect #8

Closed alfmel closed 10 years ago

alfmel commented 10 years ago

I tried using the PDO-via-OCI8 driver using my standard DSN but it didn't work. I then noticed the DSN was immediately passed to the OCI8 driver without modification. Looking at the commits, I noticed the DSN parser was removed back in February. I'm just curious, why was it removed? I'm thinking of restoring this functionality in my fork, but wanted to know more about its removal before proceeding.

Thanks.

yajra commented 10 years ago

DSN parsing was moved on my other package Laravel OCI8 - Connector since I think it should be implemented via Laravel Connector.

But if your planning to use this package as stand alone, maybe you should implement the DSN parser back.

alfmel commented 10 years ago

That makes sence. Thank you for the quick reply.

One final question: the SqlException seems to be identical to PDOException; it even has the errorInfo property already defined. Is there a particular reason this exception exists? Also, none of the thrown exceptions use errorInfo. Should the thrown PDOException or SqlException set errorInfo with the output of oci_error()?

yajra commented 10 years ago

SqlException is just a template in-case we want to enhance Exception handling.

yajra commented 10 years ago

as I recall, the errorInfo variable was added because an error occurs without it.

alfmel commented 10 years ago

OK. Thanks for the info. I'll be submitting more pull requests as I play around with the code. Feel free to merge or reject any of them.

Thank you so much for your project. I'm hoping it will solve the problems we have with pdo_oci.