Hi,
I am trying to install Opencart 4 with MSSql Server. I have successfully installed the Opencart 4 with MSSql Server and after changing the query syntax, store login. But I have problem with admin login whenever I am trying to login in admin, its just redirect to login page again.
When i checked it in the details:
1. Admin login page load session login_token generated
2. But when click on Login button, $this->session->data['login_token'] undfined mean session lost. So after click on login button its just redirect to me login page
Please help me to give ideas and to fix the error so we have Opencart 4 with mssql server. thanks for everyone
I am trying to install Opencart 4 with MSSql Server. I have successfully installed the Opencart 4 with MSSql Server and after changing the query syntax, store login. But I have problem with admin login whenever I am trying to login in admin, its just redirect to login page again.
When i checked it in the details:
1. Admin login page load session login_token generated
2. But when click on Login button, $this->session->data['login_token'] undfined mean session lost. So after click on login button its just redirect to me login page
Please help me to give ideas and to fix the error so we have Opencart 4 with mssql server. thanks for everyone
You haven't provided much details, such as the OpenCart version, etc. But in general, databases other than the MySQL/MariaDB won't work, not without a lot of modifications. Also, you shouldn't run OpenCart on a Windows server.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
@ADD Creative, Dear I have changed session_engine to file in system/config/admin.php and its working fine. Thanks but needs to check in case of session_engine is db.
Right now i am doing testing and once done or any issue will update you.
@JNeuhoff, Dear Guru Sir, Please check the detail below:
Opencart Version: 4.0.2.3
Operating System: Window 11 64bit (testing)
Sql Server Version: Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
Please give your suggestion/ idea will be very useful. You are right, we have to do lots of modification but if we do then finally we have the working opencart with mssql I am sure.
Right now i am doing testing and once done or any issue will update you.
@JNeuhoff, Dear Guru Sir, Please check the detail below:
Opencart Version: 4.0.2.3
Operating System: Window 11 64bit (testing)
Sql Server Version: Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
Please give your suggestion/ idea will be very useful. You are right, we have to do lots of modification but if we do then finally we have the working opencart with mssql I am sure.
Sounds like you need to check your oc_session table is correct and the queries in system/library/session/db.php.
It is especially worse in OpenCart 4.0.2.3, as opposed to 3.0.4.0, with regards to the support for databases other than MySQL, because it uses loads of unneeded backquotes for field names. You'll end up having to replace them all if you plan to use MSSQL:
In MySQL, that might be written:
In MS SQL Server, that might be written:
This will probably be just the tip of the iceberg.
And you'll have to implement a MSSQL driver for OpenCart in the first place in the system/library/db.
As said before, OpenCart was only written for MySQL.
In MySQL, that might be written:
Code: Select all
SELECT `select` FROM `from`;
Code: Select all
SELECT [select] FROM [from];
And you'll have to implement a MSSQL driver for OpenCart in the first place in the system/library/db.
As said before, OpenCart was only written for MySQL.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
You're absolutely right! The excessive use of backquotes in OpenCart 4.0.2.3 makes it a nightmare when trying to work with anything other than MySQL. The need to manually replace them for MSSQL is a huge time sink. Plus, setting up a driver for MSSQL in the system is no small task. It really shows that OpenCart was designed with only MySQL in mind, making it far less flexible for developers who want to use other databases. It would be great if OpenCart could introduce better support for alternative databases in future versions.
Who is online
Users browsing this forum: No registered users and 1 guest