Code Monkey home page Code Monkey logo

Comments (3)

daveh avatar daveh commented on July 20, 2024 2

@corelus I'm actually using XAMPP, but the results should be the same. To use PDO with MariaDB you need to install the PHP MySQL package - on Linux this would be

sudo apt-get install php-mysql

for example

from php-rest-api.

daveh avatar daveh commented on July 20, 2024

This looks like a PHP version issue - if you're on a version prior to PHP8, you can't use constructor property promotion (adding visibility modifiers in the constructor arguments)

from php-rest-api.

corelus avatar corelus commented on July 20, 2024

Hi @daveh, great tutorial & nice work! thanks for sharing!
But could you please provide the environment requirements such as which PDO drivers are needed to get the project works. I started with this tutorial on youtube & wanted to continue the full course with Authentication & so on on Udemy, but I am kind of stuck at this point, because contrary to you in your the main tuto I'm not using MAMP, I am using docker and I'm running PHP 8 with MariaDB 10.9.3 & I've PDO Sqlite with its library SQLite Library | 3.34.1 running & I got the message -> could not find driver","file":"/var/www/html/src/Database.php","line":16

from php-rest-api.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.