I can't install Newscoop 4.2 in a shared environment. When installing the database, this is the error message:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)' in /public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:633\nStack trace:\n#0 /public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(633): PDO->query('CREATE FUNCTION...')\n#1 /public_html/library/Newscoop/Doctrine/AdoDbAdapter.php(66): Doctrine\\DBAL\\Connection->executeQuery('CREATE FUNCTION...', Array)\n#2 /public_html/install/scripts/SQLImporting.php(89): Newscoop\\Doctrine\\AdoDbAdapter->execute('CREATE FUNCTION...')\n#3 /public_html/install/classes/CampInstallationBase.php(344): importSqlStoredProgram(Object(News in /public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 633, referer: http://socialisterna.org/install/index.php
How can I avoid the SUPER privilege to the database?
Post edited by Sebastian Olsson (2) at 2013-07-22 14:43:57
The file newscoop/install/sql/checkpp.sql creates the stored function CheckPolygonPoint() in the MySQL database. Binary logging is enabled on the server, so CREATE FUNCTION needs the SUPER privilege which they of course cannot grant to the Newscoop MySQL user.
What would happen if I delete checkpp.sql before installing Newscoop?
Should I comment out { // installing the stored function for 'point in polygon' checking $sqlFile = CS_INSTALL_DIR . DIR_SEP . 'sql' . DIR_SEP . "checkpp.sql"; importSqlStoredProgram($g_ado_db, $sqlFile); } from CampInstallationBase.php? What would it break? Will the maps stop working completely or just some part of them?
Or should I install a previous version of Newscoop? What is the latest version of Newscoop that can be installed on a MySQL server with binary logging enabled without being a 'trusted function creator' and without the SUPER privilege?
Dear Sebastian, I would suggest to ask your web host provider to allow you to create this function. It is a safe function for a clever selecting of geo-points. It does not write anything anywhere. And MySQL without a possibility for such SQL functions is a too restricted thing.
If you want to play, you can edit newscoop/install/scripts/SQLImporting.php; to put "return $was_correct;" after the first "$was_correct = true;" line in the importSqlStoredProgram function definition.