@Findus23 opened this Issue on October 16th 2020 Member

This has been reported twice independently on the forum:
https://forum.matomo.org/t/mysqli-prepare-error-you-have-an-error-in-your-sql-syntax-check-the-manual-that-corresponds-to-your-mysql-server-version-for-the-right-syntax-to-use-near-at-line-1/38986
https://forum.matomo.org/t/mysqli-error-when-upgrading-to-matomo-4-beta/38924

Log from the latter post including SQL queries:


DEBUG Piwik\Plugin\Manager[2020-10-13 06:11:11 UTC] [7a606] Loaded plugins: CorePluginsAdmin, CoreAdminHome, CoreHome, WebsiteMeasurable, IntranetMeasurable, Diagnostics, CoreVisualizations, Proxy, API, Widgetize, Transitions, LanguagesManager, Actions, Dashboard, MultiSites, Referrers, UserLanguage, DevicesDetection, Goals, Ecommerce, SEO, Events, UserCountry, GeoIp2, VisitsSummary, VisitFrequency, VisitTime, VisitorInterest, RssWidget, Feedback, Monolog, Login, TwoFactorAuth, UsersManager, SitesManager, Installation, CoreUpdater, CoreConsole, ScheduledReports, UserCountryMap, Live, PrivacyManager, ImageGraph, Annotations, MobileMessaging, Overlay, SegmentEditor, Insights, Morpheus, Contents, BulkTracking, Resolution, DevicePlugins, Heartbeat, Intl, Marketplace, ProfessionalServices, UserId, CustomJsTracker, Tour, PagePerformance, CustomDimensions
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] Uncaught exception: pathto/matomo/libs/Zend/Db/Statement/Mysqli.php(77): Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 1
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 1
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/0'>#0</a> pathto/matomo/libs/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SHOW TABLES LIK...')
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/1'>#1</a> pathto/matomo/libs/Zend/Db/Adapter/Mysqli.php(419): Zend_Db_Statement->__construct(Object(Piwik\Db\Adapter\Mysqli), 'SHOW TABLES LIK...')
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/2'>#2</a> pathto/matomo/libs/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('SHOW TABLES LIK...')
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/3'>#3</a> pathto/matomo/core/DbHelper.php(40): Zend_Db_Adapter_Abstract->query('SHOW TABLES LIK...', Array)
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/4'>#4</a> pathto/matomo/plugins/Login/Auth.php(68): Piwik\DbHelper::tableExists('user_token_auth')
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/5'>#5</a> pathto/matomo/core/Access.php(187): Piwik\Plugins\Login\Auth->authenticate()
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/6'>#6</a> pathto/matomo/core/FrontController.php(405): Piwik\Access->reloadAccess(Object(Piwik\Plugins\Login\Auth))
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/7'>#7</a> pathto/matomo/core/dispatch.php(31): Piwik\FrontController->init()
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/8'>#8</a> pathto/matomo/index.php(25): require_once('pathto...')
ERROR Piwik\ExceptionHandler[2020-10-13 06:11:11 UTC] [7a606] <a href='/9'>#9</a> {main}
DEBUG Piwik\Profiler[2020-10-13 06:11:11 UTC] [7a606] <hr /><strong>SQL Profiler</strong><hr /><strong>Summary</strong><br/>Executed 5 queries in 0.019 seconds(Average query length: 0.004 seconds)<br />Queries per second: 259.4<br />Longest query length: 0.019 seconds (<code>INSERT INTO matomo_session (id,modified,lifetime,data) VALUES (?,?,?,?) ON DUPLICATE KEY UPDATE modified = ?,lifetime = ?,data = ?</code>)
DEBUG Piwik\Profiler[2020-10-13 06:11:11 UTC] [7a606] <hr /><strong>Breakdown by query</strong><br/>Executed <b>1</b> time in <b>18.8ms</b>  <pre>  INSERT INTO matomo_session (id,modified,lifetime,data) VALUES (?,?,?,?) ON DUPLICATE KEY UPDATE modified = ?,lifetime = ?,data = ?</pre>Executed <b>1</b> time in <b>0.3ms</b>  <pre>   SELECT data FROM matomo_session WHERE id = ? AND modified + lifetime >= ?</pre>Executed <b>1</b> time in <b>0.1ms</b>  <pre>    SELECT DATABASE()</pre>Executed <b>1</b> time in <b>0.1ms</b>  <pre>    SELECT option_value, option_name FROM `matomo_option` WHERE autoload = 1</pre>Executed <b>1</b> time in <b>0.1ms</b>  <pre> SELECT option_value FROM `matomo_option` WHERE option_name = ?</pre>
DEBUG Piwik\Profiler[2020-10-13 06:11:11 UTC] [7a606] Total queries = 5 (total sql time = 0.02s)
This Issue was closed on October 19th 2020
Powered by GitHub Issue Mirror