Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for pdo_mysql #606

Closed
fritzmg opened this issue Oct 21, 2020 · 4 comments
Closed

Check for pdo_mysql #606

fritzmg opened this issue Oct 21, 2020 · 4 comments

Comments

@fritzmg
Copy link
Contributor

fritzmg commented Oct 21, 2020

If you install Contao without the pdo_mysql PHP extension being enabled/present, the following error will occur:

In FileLoader.php line 180:
                                                                               
  The file "…/contao/vendor/contao/manager-bundle/src/Resources/skeleton/config/config.yml" does not contain valid YAML: The constant "PDO::MYSQL_ATTR_MULTI_STATEMENTS" is not defined at line 52 (near "!php/const PDO::MYSQL_ATTR_MULTI_STATEMENTS: false") in …/contao/vendor/contao/manager-bundle/src/Resources/skeleton/config/config.yml (which is being imported from "…/contao/vendor/contao/manager-bundle/src/Resources/skeleton/config/config_prod.yml").                     
                                                                               
In YamlFileLoader.php line 693:
                                                                               
  The file "…/contao/vendor/contao/manager-bundle/src/Resources/skeleton/config/config.yml" does not contain valid YAML: The constant "PDO::MYSQL_ATTR_MULTI_STATEMENTS" is not defined at line 52 (near "!php/const PDO::MYSQL_ATTR_MULTI_STATEMENTS: false").                               
                                                                               
In Inline.php line 615:
                                                                               
  The constant "PDO::MYSQL_ATTR_MULTI_STATEMENTS" is not defined at line 52 (near "!php/const PDO::MYSQL_ATTR_MULTI_STATEMENTS: false").  

Thus the system check should check for PDO support in PHP.

See also https://community.contao.org/de/showthread.php?76224-Installationsfehler-Konstante-PDO-MYSQL_ATTR_MULTI_STATEMENTS

@aschempp
Copy link
Member

if you don't have pdo_mysql, wouldn't that mean Contao can't be installed because that should be a requirement of DBAL or someone? Isn't that error rather specified to an old version of PDO?

@Toflar
Copy link
Member

Toflar commented Oct 23, 2020

No, not of DBAL. Because it is an abstraction :D So why would it require pdo_mysql if you decide to use sqlite?
It should be a requirement of contao/core-bundle indeed but the check should be added to the Manager nevertheless (Composer would just install an old version of Contao).

@fritzmg
Copy link
Contributor Author

fritzmg commented Oct 23, 2020

We could add the PHP extension requirement to contao/conflicts additionally.

@aschempp
Copy link
Member

We shouldn't add that as discussed in contao/contao#2459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants