Success Case: Overcoming Database Migration Challenges
A customer encountered an issue during the database migration process. When reaching the osCommerce Connector Service page, they received the following failure message:
"failed to open stream: no suitable wrapper could be found." Despite entering the secure key and trying all three secure methods, they were unable to proceed.
The osCommerce support team advised replacing the Importer.php file in lib/common/extensions/OscLink/lib/ with the provided patched version. Additionally, they recommended enabling the allow_url_include option in the php.ini file, referring to the official PHP documentation: PHP Configuration - allow_url_include
Following these steps, the customer was able to move past the initial error. However, they encountered another issue when attempting to import categories. The process was interrupted with the following error:
Start import for Categories... Expecting: 7
Import was interrupted due to an error: Object of class
common\extensions\OscLink\models\Entity could not be converted to string.
Failed to prepare SQL: SELECT COUNT(*) FROM `categories`.`f` LEFT JOIN
`connector_osclink_mapping` `m` ON m.internal_id = f.categories_id AND entity_id => :entityId
WHERE m.internal_id IS NULL
The support team provided another patched version of Importer.php to resolve this issue. After applying the fix, the customer successfully converted the database.
Following the resolution, the customer shared three key suggestions:
- The database conversion instructions should be updated. The instructions state that extracting the converter into the shop root will create the oscb directory. However, in the latest version, files are extracted directly into the shop root. Either the package or the instructions should be updated for clarity.
- When clicking the Import button, an indicator should show that the process is running. While small tables load quickly, large tables take longer, with no visible indication that the operation is in progress. This would improve user experience.
- A message should notify users if the allow_url_include option is disabled. Since newer PHP versions disable this setting by default, other users may encounter similar issues.
The osCommerce support team appreciated these insights and confirmed plans to implement them. Regarding the delay in imports, they explained that caching (likely due to FPM caching) causes the delay. While the only available solution is to mark the beginning of the operation, they acknowledged the need for better user feedback during long imports.
This success case highlights how proactive troubleshooting and user feedback contribute to ongoing improvements in osCommerce. We value user feedback and continuously strive to improve our products, making them more efficient and user-friendly.