# Stuck on composer install - Undefined constant PDO::MYSQL\_ATTR\_USE\_BUFFERED\_QUERY

**URL:** <https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [May 9, 2024, 5:01pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024 "2024-05-09T17:01:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwhoski](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jwhoski](https://forum.mautic.org/u/jwhoski)\
**Post date:** [May 9, 2024, 5:01pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/1 "2024-05-09T17:01:59Z")

</div>

Trying to get this installed on a fresh debian 12 LAMP stack VM based upon the requirements defined on your site.

**Your software**  
My Mautic version is: 5.0.4  
My PHP version is: 8.1.28  
My Database type and version is: mysql Ver 15.1 Distrib 10.11.6-MariaDB,

Many errors encountered during the install process outlined on github but I’m now stuck on this one:

```auto
composer install

> bin/console mautic:assets:generate
PHP Fatal error: Uncaught Error: Undefined constant PDO::MYSQL_ATTR_USE_BUFFERED_QUERY in /var/www/html/app/config/config.php:160

```

These errors are showing in the log: N/A

Steps I have tried to fix the problem: Searched the forum and internet

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [May 9, 2024, 8:55pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/2 "2024-05-09T20:55:38Z")

</div>

What are those PHP “requirements defined on [your] site” and what is your actual configuration?

---

<div class="post-metadata">

**Author:** ![jwhoski](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jwhoski](https://forum.mautic.org/u/jwhoski)\
**Post date:** [May 9, 2024, 9:32pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/3 "2024-05-09T21:32:51Z")

</div>

I’m following the instructions on the github page and the [mautic.org](http://mautic.org) site. The pre-install requirements are defined here: [Mautic Requirements - Mautic](https://www.mautic.org/download/requirements).

Debian12, Apache2, and the versions of PHP, mariadb, and Mautic listed above are all installed and operational.

Then the github site says this:

### How to install Mautic

You must already have [Composer](http://getcomposer.org/) available on your computer because this is a development release and you’ll need Composer to download the vendor packages.

Also note that if you have DDEV installed, you can run ‘ddev config’ followed by ‘ddev start’. This will kick off the Mautic first-run process which will automatically install dependencies and configure Mautic for use. ✨ 🚀 Read more [here](https://kb.mautic.org/article/how-to-set-up-a-mautic-instance-for-testing-locally-with-ddev.html)

Installing Mautic is a simple three-step process:

1. [Download the repository zip](https://github.com/mautic/mautic/archive/refs/heads/features.zip) then extract the zip to your web root.
2. Run the `composer install` command to install the required packages.
3. Open your browser and complete the installation through the web installer.

If you get stuck, check our our [general troubleshooting](https://docs.mautic.org/en/troubleshooting) page. Still no joy? Join our lively [Mautic Community](https://www.mautic.org/community) for support and answers.

The error happens on step 2 above while running the composer install command.

A little poking around in the config.php file says this from a package which called Doctrine which is needed by Symfony. But I don’t know what to do about the error or why the mautic:assets:generate is complaining about it.

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [May 9, 2024, 9:47pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/4 "2024-05-09T21:47:49Z")

</div>

Your problem is most likely that you aren’t satisfying the PHP requirements

i.e.  
Are you sure that your PDO module is properly installed?

I would invite you once again to share your actual configuration.

---

<div class="post-metadata">

**Author:** ![jwhoski](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jwhoski](https://forum.mautic.org/u/jwhoski)\
**Post date:** [May 9, 2024, 9:50pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/5 "2024-05-09T21:50:07Z")

</div>

I guess I’m not sure what you want for ‘actual configuration’. Happy to post anything you need but I need some guidance. Thanks.

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [May 9, 2024, 9:53pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/6 "2024-05-09T21:53:10Z")

</div>

What are your actual PHP module loaded?

That would be an excellent start

---

<div class="post-metadata">

**Author:** ![jwhoski](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jwhoski](https://forum.mautic.org/u/jwhoski)\
**Post date:** [May 9, 2024, 10:08pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/7 "2024-05-09T22:08:29Z")

</div>

Here is a list of the php modules loaded:

#php -m  
[PHP Modules]  
bcmath  
calendar  
Core  
ctype  
curl  
date  
dom  
exif  
FFI  
fileinfo  
filter  
ftp  
gd  
gettext  
hash  
iconv  
imap  
json  
libxml  
openssl  
pcntl  
pcre  
PDO  
Phar  
posix  
readline  
Reflection  
session  
shmop  
SimpleXML  
sockets  
sodium  
SPL  
standard  
sysvmsg  
sysvsem  
sysvshm  
tokenizer  
xml  
xmlreader  
xmlwriter  
xsl  
Zend OPcache  
zip  
zlib

[Zend Modules]  
Zend OPcache

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [May 9, 2024, 10:24pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/8 "2024-05-09T22:24:13Z")

</div>

_PDO is there. So it must be something else._

> “#”

Are you using root to manage a PHP web app? That wouldn’t be a good idea (guaranteed breakage)

Other than that, I would look at the Apache+MySQL module.

Have you installed the php-mysql module?

```auto
sudo apt-get install php-mysql

```

---

<div class="post-metadata">

**Author:** ![jwhoski](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jwhoski](https://forum.mautic.org/u/jwhoski)\
**Post date:** [May 9, 2024, 11:21pm UTC](https://forum.mautic.org/t/stuck-on-composer-install-undefined-constant-pdo-mysql-attr-use-buffered-query/32024/9 "2024-05-09T23:21:15Z")

</div>

I installed the php8.1-mysql as suggested and the composer install finished.  
I am using root to get things sorted but will switch to www-data once running with users. Thanks for the help.
