Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had a small LAMP stack sight running on my local drive. I copied all my php/html files over to my digital oceans debian LAMP stack server. The only difference between the two is on my local drive I used MySQL and on my DO Debian LAMP I used MariaDB. When I try to go to make an http request to my DO Devian server the page loads to "This page isn't workding" and my apache2 log is showing:
PHP Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/html/includes/database.php
I was under the impression that MariaDB was a more open source copy of MySQL and the databases should be pretty much interchangeable, especially at this level of development.
I haven't imported it yet but I don't think that would cause this problem. My problem right now is that my php code doesn't even know what myqli is. I'm having trouble importing it too.
Well, if the site depends on the database and the database has not yet been imported, that might be why the site's not working.
What specific errors have you encountered in trying to import the database and in trying to visit the site? The more detailed information you provide, the easier it will be for others to help you.
(Be careful to surround any terminal output with "code" tags which become available when you click the "Advanced" button beneath the compose/edit post window. It makes terminal output much easier to read.)
Well, if the site depends on the database and the database has not yet been imported, that might be why the site's not working.
What specific errors have you encountered in trying to import the database and in trying to visit the site? The more detailed information you provide, the easier it will be for others to help you.
(Be careful to surround any terminal output with "code" tags which become available when you click the "Advanced" button beneath the compose/edit post window. It makes terminal output much easier to read.)
Well on my local machine if there was a database issue the site would still load it's just that items, usually images, there were populated using information from the database, would populate, so instead of a page showing rows and columns of vehicles I would get all the html/css & java script boxes and a little bit of text but there would be no images, and the boxes would be smashed down. My original plan was to get the site loading albeit without data from the database. Once I get the site loading I would work on getting the database imported, I was trying not to solve two problems at once. On my local machine I used MySQL and did everything as the MySQL root user. On my digital oceans server I installed MariaDB instead and I was also also going to create another user to manage the database. I'm not too good with databases. I already have my .sql file and it's ready to be imported I just need to get another user created, grant the correct privileges, and get it imported. Yesterday I was getting a privileges error using the MariaDB root user?
This sounds like an error in your PHP installation, e.g. a missing module. The driver layer isn't there, so PHP can't talk to anything.
Rant: I personally wish that Maria would just go away, and that all of its goodness would be folded into the official, Oracle-supported, "MySQL." Something as fundamentally important as a database ought not be "forked" so that it now goes in two different directions. Maria has some really good ideas and improvements, but these should be in "MySQL."
Last edited by sundialsvcs; 05-27-2022 at 10:37 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.