I also got an error when trying to update pathauto. It didn't help to use the dev version (like mentioned here). I use Drupal 7.7 (multisite installation), PHP 5.2.14, MySQL 5.0.67

The following updates returned messages
pathauto module
Update #7005

    Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ':db_condition_placeholder_1 ESCAPE '\\') )' at line 1: SELECT v.name AS name FROM {variable} v WHERE ( (name LIKE :db_condition_placeholder_0 ESCAPE '\\') OR (name LIKE :db_condition_placeholder_1 ESCAPE '\\') ); Array ( [:db_condition_placeholder_0] => pathauto\_taxonomy\_term\_%pattern [:db_condition_placeholder_1] => pathauto\_forum\_%pattern ) in pathauto_update_7005() (line 159 of /home/d/distrikt/www/sites/all/modules/pathauto/pathauto.install).

Comments

tvilms’s picture

I'm getting a similar error, but it comes up at a different time. I was able to update path auto to 7.x-1.0-rc2, but but when I try to change the "Settings" I get the following error and I can't proceed. I'm on Drupal 7.7 with PHP 5.3.6 and MySQL 5.0.8.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {menu_links} WHERE menu_name = :menu_name AND module = :module AND link_path = :path; Array ( [:menu_name] => management [:module] => system [:path] => admin ) in toolbar_get_menu_tree() (line 279 of ...\modules\toolbar\toolbar.module).

nonom’s picture

Same problem here, not allowing to see the patterns settings page.

I'm on Drupal 7.7 with PHP 5.3.6 and MySQL 5.5

Dave Reid’s picture

Status:Active» Postponed (maintainer needs more info)

@tvilms: The menu SQL error is unrelated to Pathauto.

I fail to see what's actually wrong with the SQL as copy/pasted...

kevroc’s picture

I get this error when attempting to go into the "Patterns" Tab. All other tab/settings areas seem to work okay, but when I click "Patterns" I get the error.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT alias FROM {url_alias} WHERE source = :source AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:source] => user/1/edit [:language] => en [:language_none] => und ) in drupal_lookup_path() (line 150 of

Running Drupal 7.8

Dave Reid’s picture

@kevroc: Your error is unrelated to this issue. Your database server dropped its connection.

Dave Reid’s picture

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)
Renee S’s picture

Status:Active» Closed (cannot reproduce)

This is happening to me too - the database is dying only on that one page, with the same error. When I disable Toolbar the page displays; when I enable it, I get a dead db connection. This happens on /admin/config/search/path/patterns.

I'm running PHP 5.3. I've got Pathauto, OG, Views, CTools, Statuses, WYSIWYG, Panels... pretty typical install.

The browser error is

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {menu_links} WHERE menu_name = :menu_name AND module = :module AND link_path = :path; Array ( [:menu_name] => management [:module] => system [:path] => admin ) in toolbar_get_menu_tree() (line 286 of /Users/reneestephen/Sites/local/internal/modules/toolbar/toolbar.module).

(and lots more, but basically just errors that are thrown by whatever is trying to load as the DB dies).

and the PHP error is:

[02-Aug-2012 09:47:35] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /includes/database/database.inc:2136
Stack trace:
#0 /includes/database/database.inc(2136): PDOStatement->execute(Array)
#1 /includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)
#2 /includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)
#3 /includes/lock.inc(167): db_query('SELECT expire, ...', Array)
#4 /includes/lock.inc(146): lock_may_be_available('schema:runtime:...')
#5 /includes/bootstrap.inc(405): lock_acquire('schema:runtime:...')
#6 /includes/bootstrap.inc(427): DrupalCacheArray->set(Array)
#7 [inter in /includes/database/database.inc on line 2136

I'll start disabling things to see if there's another module causing this...

Renee S’s picture

Status:Closed (cannot reproduce)» Active
Dave Reid’s picture

Please file a new issue as your issues seem unrelated to pathauto_update_7005(), and also seem more related to the performance of your database rather than anything being responsible in Pathauto.

Jeffrey C.’s picture

Status:Closed (cannot reproduce)» Active

The exact same problem here. Actually, I was thinking if it's necessary to look into this issue while it's not just one user that experienced this.

Albert Volkman’s picture

I had this same issue and I was able to resolve it by increasing the max_allowed_packet size. I set it to 1M and the page started loading properly:

max_allowed_packet=1M