Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Cart 3.0 SQL Server Support? #6479

Closed
bhglove opened this issue Mar 21, 2018 · 3 comments
Closed

Open Cart 3.0 SQL Server Support? #6479

bhglove opened this issue Mar 21, 2018 · 3 comments

Comments

@bhglove
Copy link

bhglove commented Mar 21, 2018

Hi, I used opencart a few years ago and I'm pretty sure I was able to use MSSQL with Open Cart 2.0. I'm hitting a block with the installer on step 3 and getting a "Driver not found" exception.

Here is a screenshot of my phpinfo.
phpinfo().pdf

Are there any resources for installing Open Cart 3.0 with SQL Server?

Thanks

@straightlight
Copy link
Contributor

Not a bug. Simply switch to mssql from your config.php and admin/config.php files with the DB_DRIVER defined constant once the installation completed.

@bhglove
Copy link
Author

bhglove commented Mar 22, 2018

The config files are not defined yet because I can't get past the installation.

@bhglove
Copy link
Author

bhglove commented Mar 22, 2018

I modified line 9 of \opencart\app\system\library\db\mpdo.php
from:
$this->connection = new \PDO("mysql:host=" . $hostname . ";port=" . $port . ";dbname=" . $database, $username, $password, array(\PDO::ATTR_PERSISTENT => true));
to :
$this->connection = new \PDO("sqlsrv:Server=" . $hostname . ";Database=" . $database, $username, $password, array(\PDO::SQLSRV_ATTR_DIRECT_QUERY => true));

@bhglove bhglove closed this as completed Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants