Hi. I have a vhost set to opencart.virtualmin.timetakernet.info . The only setting I changed from the default is to switch the PHP Version to 7.4 (as installed by following this guide: hxxps://www.virtualmin.com/documentation/web/multiplephp/ )
Downloading hxxps://github.com/opencart/opencart/releases/download/3.0.3.8/opencart-3.0.3.8.zip …
Downloading hxxps://objects.githubusercontent.com/github-production-release-asset-2e65be/2141186/82eb7fad-3aba-466e-814a-4bd5e63a79c3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230424%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230424T191107Z&X-Amz-Expires=300&X-Amz-Signature=8039c995d23a1888535e216af37071acce0af5cc36a2460aec93a175b5a86d05&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=2141186&response-content-disposition=attachment%3B%20filename%3Dopencart-3.0.3.8.zip&response-content-type=application%2Foctet-stream (16.43 MiB) …
Received 1 KiB (0 %)
Received 1.64 MiB (10 %)
Received 3.28 MiB (20 %)
Received 4.93 MiB (30 %)
Received 6.57 MiB (40 %)
Received 8.21 MiB (50 %)
Received 9.86 MiB (60 %)
Received 11.5 MiB (70 %)
Received 13.14 MiB (80 %)
Received 14.79 MiB (90 %)
Received 16.43 MiB (100 %)
… download complete.
Checking PHP modules …
Installing recommended PHP mcrypt module …
… done
… checking done
Configuring webserver PHP settings …
… already done
Restarting PHP-FPM 8.0 server …
… done
Restarting PHP-FPM 7.4 server …
… done
Now installing OpenCart version 3.0.3.8 …
Database setup failed
More information on using this script can be found at http://www.opencart.com/
Installation can be continued manually at hxxps://opencart.virtualmin.timetakernet.info//
… installation was only partially complete.
Re-loading Webmin …
… done
The other question is: Why the installer is setting the opencart config URL to hxxps://**www.**opencart.virtualmin.timetakernet.info causing the browser to not load icons due to CORS on the non-www URL? And why is the extra trailing slash getting added?
Thanks in advance.
P.S. Replaced https to hxxps, so I can post the post.
It’s working, but icons are not loading - first issue - they work with www, but i never specified www anywhere. Second issue, I am not able to view default login in “Scripts” on the installed thing. It says " Partial installation error Database setup failed". Third issue: If i am going to be putting clients on this server, it should work.
At first you wanted to install OpenCart on the default domain, where database for domain was disabled and it failed
Later you went to Edit Virtual Server page and enabled MariaDB database feature
Afterwards, you didn’t click Install Scripts link and just used history buttons in the browser to go back to OpenCart install page and hit enter
Is this how it was?
@Jamie, we cannot assume to use PostgreSQL if MySQL isn’t available. Now, if one doesn’t have MySQL database feature enabled and PostgreSQL is also not enabled then install script just assumes PostgreSQL. We should show an error before going to the Install Script page if database for the script is required but not available and not after install button is clicked.
@radi All you should do is to remove previously installed (failed) OpenCart script and reinstall it. It works just fine on my RHEL 9.1 box. Please let us know if that worked for you.
[root@virtualmin ~]# mysql --version
mysql Ver 15.1 Distrib 10.5.16-MariaDB, for Linux (x86_64) using EditLine wrapper
My vhost’s DB username is opencart. I tried to connect with the settings from config.php in opencart, and it worked just fine. I am able to see the empty database created with the vhost and the database, which the installer setup with opencart installation.
Try creating a new domain and install OpenCart. Does it work for you then?
If it works for you with a new domain, perhaps database user password was changed outside of Virtualmin in the old domain (the one that is failing now)? If so, try going to Virtualmin / Edit Databases page with the given domain and change the password and the username.
I have tried to reproduce this issue but it works flawlessly for me on all distros I tried.
@Jamie, post_http_connection makes a connection and never finishes, even though the call is successful. There should be a reasonable timeout for this function to run, which should be possible to pass as param.
@radi This is absolutely illogical why OpenCart 3.0.3.8 installation fails (hangs forever with our post_http_connection request) on RHEL 8 and 9 despite PHP version used, and work just fine in Debian/Ubuntu. Also, OpenCart 4.0.2.0 installation works perfectly fine on all distros. Installers for both 3.0.3.8 and 4.0.2.0 expect absolutely identical payload! I don’t think Virtualmin is doing something wrong here.
Although, @Jamie, what we could do to work around the problem, is to make a post_http_connection request with a timeout, and don’t do error check afterwards. Because right after a few seconds as post_http_connection is called on RHEL 8/9 when OpenCart 3.0.3.8 is being installed, it’s already finishes installation (database setup). But for some reason post_http_connection doesn’t get a response and hangs forever. Perhaps, it’s a bug in post_http_connection, maybe?