Jump to content

Recommended Posts

Posted

Hello,

after migrating a PW-Site to a new server, a client gets an 500 Internal Server Error.

The Debug-Mode tells:

Error: Exception: SQLSTATE[42000]: Syntax error or access violation: 1055 'db468587.pages.parent_id' isn't in GROUP BY (in /var/www/vhosts/.../httpdocs/wire/core/Pages.php line 2103)

#0 /var/www/vhosts/.../httpdocs/wire/core/Pages.php(2103): PDOStatement->execute()
#1 /var/www/vhosts/.../httpdocs/wire/core/Pages.php(546): Pages->executeQuery(Object(PDOStatement))
#2 /var/www/vhosts/.../httpdocs/wire/core/Pages.php(130): Pages->getById(Array)
#3 /var/www/vhosts/.../httpdocs/wire/core/ProcessWire.php(300): Pages->init()
#4 /var/www/vhosts/.../httpdocs/wire/core/ProcessWire.php(259): ProcessWire->initVar('pages', Object(Pages))
#5 /var/www/vhosts/.../httpdocs/wire/core/ProcessWire.php(94): ProcessWire->load(Object(Config))
#6 /var/www/vhosts/.../httpdocs/index.php(232): ProcessWire->__construct(Object(Config))
#7 {main}

 

Any Idea or Help appreciated!

Posted

Hi and welcome,

The version of the MySQL server could help here. Post also the ProcessWire version (the old and the new) please.

  • Like 2
Posted

Hi,

it's

Mysqli mysqlnd 5.0.12-dev and Mysql driver for pdo mysqlnd 5.0.12-dev.

In beetween I got the message from the provider:

Quote

The system uses new environments, which usually cause no problems. Above all a connection with mysqli instead of mysql. Current PHP versions use PDO instead of classic mysql connection.

Try: $pdo = new PDO ('mysql: host = localhost; dbname = test', 'username', 'password');

I got no idea what to do with that...

Posted
7 minutes ago, Mario Keipert said:

Mysqli mysqlnd 5.0.12-dev and Mysql driver for pdo mysqlnd 5.0.12-dev.

Maybe your problem is that your server don't met the ProcessWire requirements, it ask for a 5.0.15 or greater version of MySQL.

https://processwire.com/about/requirements/

Quote

 

  • MySQL or MariaDB, 5.0.15 or greater (5.5+ preferable)

 

 

You might want give a try at installing a fresh ProcessWire 3 installation on this server to see what happen.

Which hosting type are you using ?

  • Like 2
Posted

So I must say, 1) upgrade your server, 2) if you can't, ask the support to do it, 3) if they can't do that, get out of this hosting provider..

Posted

Also, you could ask why, but oh why they still have this MySQL version full of security vulnerabilities installed on the server ?!

Just sayin, this version is eleven years old!

  • Like 2
Posted

This is interesting - it might be the MySQL version, but it might also be the MySQL ONLY_FULL_GROUP_BY setting. ProcessWire requires that is removed, but it only gets removed for 5.7.0+ https://github.com/processwire/processwire/blob/3fc9f69da75e1bc4a3f0842f12a57bd6a1b65099/wire/config.php#L897

If you add this to your config.php it might just work:

$config->dbSqlModes = array(
    "5.0" => "remove:STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY"
);

That said, I would definitely get an upgrade to MySQL because there could be other issues with that version as well.

  • Like 3
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...