Quantcast
Channel: Question and Answer » drush
Viewing all 72 articles
Browse latest View live

“Unable to to find SQL Class. Drush cannot find your Database connection details.”

$
0
0

Just started with drupal and drush CLI but having problems already!
Here is my error:

$ drush si --debug --db-url =mysql://USERNAME:PASSWORD@HOST/DATABASE/drushfun   
Starting Drush preflight. [0 sec, 1.29 MB]                                                                                                                                                      [preflight]
Cache HIT cid: 7.1.0-commandfiles-0-33a837c10472909bafe9ab29823ddb79 [0.01 sec, 1.32 MB]                                                                                                              [debug]
Bootstrap to phase 0. [0.06 sec, 3.52 MB]                                                                                                                                                         [bootstrap]
Bootstrap to phase 1. [0.06 sec, 3.52 MB]                                                                                                                                                         [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.06 sec, 3.73 MB]                                                                                                                               [bootstrap]
Initialized Drupal 7.41 root directory at /home/USER/Documents//drupal-7.41fun [0.06 sec, 3.73 MB]                                                                           [notice]
Find command files for phase 1 (max=1) [0.07 sec, 2.71 MB]                                                                                                                                            [debug]
Cache HIT cid: 7.1.0-commandfiles-1-b9de3821d4a21c5d43292e8f9d7ffd3d [0.07 sec, 2.71 MB]                                                                                                              [debug]
Found command: site-install (commandfile=site_install) [0.07 sec, 2.71 MB]                                                                                                                        [bootstrap]
Calling hook drush_core_site_install_validate [0.09 sec, 3.75 MB]                                                                                                                                     [debug]
Returned from hook drush_core_site_install_validate [0.09 sec, 3.75 MB]                                                                                                                               [debug]
Calling hook drush_core_pre_site_install [0.09 sec, 3.76 MB]                                                                                                                                          [debug]
exception 'DrushSqlSqlException' with message 'Unable to find a matching SQL Class. Drush cannot find your database connection details.' in                                                     [error]
/home/USER/.composer/vendor/drush/drush/commands/sql/sql.drush.inc:597
Stack trace:
#0 /home/USER/.composer/vendor/drush/drush/commands/sql/sql.drush.inc(582): drush_sql_get_class(Array)
#1 /home/USER/.composer/vendor/drush/drush/commands/core/site_install.drush.inc(107): drush_sql_get_class()
#2 [internal function]: drush_core_pre_site_install('=mysql://root:r...')
#3 /home/USER/.composer/vendor/drush/drush/includes/command.inc(359): call_user_func_array('drush_core_pre_...', Array)
#4 /home/USER/.composer/vendor/drush/drush/includes/command.inc(210): _drush_invoke_hooks(Array, Array)
#5 [internal function]: drush_command('=mysql://root:r...')
#6 /home/USER/.composer/vendor/drush/drush/includes/command.inc(178): call_user_func_array('drush_command', Array)
#7 /home/USER/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(62): drush_dispatch(Array)
#8 /home/USER/.composer/vendor/drush/drush/drush.php(70): DrushBootBaseBoot->bootstrap_and_dispatch()
#9 /home/USER/.composer/vendor/drush/drush/drush.php(11): drush_main()
#10 {main} [0.09 sec, 3.78 MB]
Command dispatch complete [0.09 sec, 3.75 MB]                                                                                                                                                        [notice]
$    

Here is what i have so far:

$ drush status
Drupal version         :  7.41                                                         
Site URI               :  http://default                                               
PHP executable         :  /usr/bin/php                                                 
PHP configuration      :  /etc/php5/cli/php.ini                                        
PHP OS                 :  Linux                                                        
Drush script           :  /home/USER/.composer/vendor/drush/drush/drush.php           
Drush version          :  7.1.0                                                        
Drush temp directory   :  /tmp                                                         
Drush configuration    :                                                               
Drush alias files      :                                                               
Drupal root            :  /home/USER/Documents/drupal-7.41fun 
Site path              :   sites/default                                                

Why do i have that error? Am i missing something? Need to be able to work from the CLI.

$ php -v
PHP 5.6.17-1+deb.sury.org~precise+1 (cli) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies 

$ mysql --version
mysql  Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (i686) using readline 6.2      

mysql> SELECT VERSION();
+-------------------------+
| VERSION()               |
+-------------------------+
| 5.5.46-0ubuntu0.12.04.2 |
+-------------------------+

Drush runs out of memory, regardless of memory limit (Windows Server 2012)

$
0
0

Drush fails to execute any commands that result in changes. An error on this pattern is returned:

PHP Fatal error:  Out of memory (allocated 1223163904) (tried to allocate 130968 bytes) in C:Users*[username]*AppDataLocalComposervendordrushdrushincludesfilesystem.inc on line 361
Drush command terminated abnormally due to an unrecoverable error.                           [error]

Error: Out of memory (allocated 1223163904) (tried to allocate 130968 bytes) in C:Users*[username]*AppDataLocalComposervendordrushdrushincludesfilesystem.inc, line 361

Server is running Windows 2012R2, with Apache, PHP & MariaDB. Drush was installed on this server using Composer.

I’ve been able to adjust the memory allocation by placing the drushrc.php file in the root Drush folder (there’s no ‘.drush’ folder in a Composer install on Windows), but it doesn’t resolve the issue. When I allocate 128M or 512M, the ‘allocated’ lines in the error showed all memory allocated; the error you see above, showing 1165M allocated, was returned after I increased the allocation to 2048M. I.e., it will allocate up to 1165M, and still return the error specifying a failure to allocate 130968 bytes (guessing that corresponds to 128M, though it doesn’t seem to divide quite right).

So if I’m reading the error correctly, it seems to be telling me that it’s already allocated [512M, 128M, or 1161M, depending], but is failing to allocate 128M.

512M appears to be the default; it’s what’s set in my base PHP.ini. Still haven’t figured out where that 128M is being specified.

  1. Am I reading this error correctly? It’s saying that it needs 128M, but it can’t allocate it, because it’s only got [some value much greater than 128M]?
  2. if so, what could be going on?
  3. has anybody seen this before? I haven’t yet found a problem that looks like this. It’s obviously not a case of Drush just running out of memory.
  4. are there any other places I could be looking for memory limits? I’ve accounted for the base php.ini, drush.ini, and drushrc.php.

Here’s drush status output for this site:

Drupal version                :  7.37
Site URI                      :  http://default
Database driver               :  mysql
Database hostname             :  localhost
Database port                 :
Database username             :  [db username]
Database name                 :  [db name]
Drupal bootstrap              :  Successful
Drupal user                   :
Default theme                 :  bootstrap_gccverticalr01
Administration theme          :  seven
PHP executable                :  php.exe
PHP configuration             :  E:phpphp.ini
                         C:Users[username]AppDataLocalComposervendordrushdrushdrush.ini
PHP OS                        :  WINNT
Drush script                  :  C:Users[username]AppDataLocalComposervendordrushdrushdrush.php
Drush version                 :  7.0.0
Drush temp directory          :  C:Users[username]AppDataLocalTemp
Drush configuration           :
Drush alias files             :
Install profile               :  standard
Drupal root                   :  E:htdocsnewsdev
Site path                     :  sites/default
File directory path           :  sites/default/files
Private file directory path   :  sites/default/files/priv
Temporary file directory      :  c:windowstemp
path

Per suggestion from @greg_t_anderson, here’s a –debug on a module update:

E:htdocsnewsdev>drush up name --debug
Starting Drush preflight. [0.34 sec, 2.41 MB]                                                      [preflight]
Loading drushrc "C:Users[username]AppDataLocalComposervendordrushdrushdrushrc.php" into      [bootstrap]
"drush" scope. [0.34 sec, 2.42 MB]

Cache HIT cid: 7.0.0-commandfiles-0-6fdbceb87a2d9ef0fd59b7f3a6ad6ecd [0.45 sec, 2.48 MB]               [debug]

Bootstrap to phase 0. [0.92 sec, 6.99 MB]                                                          [bootstrap]

Bootstrap to phase 6. [0.93 sec, 7 MB]                                                             [bootstrap]

Drush bootstrap phase : bootstrap_drupal_root() [0.94 sec, 7.37 MB]                                [bootstrap]

Initialized Drupal 7.37 root directory at E:htdocsnewsdev [1.04 sec, 7.37 MB]                       [notice]

Find command files for phase 1 (max=6) [1.05 sec, 5.25 MB]                                             [debug]

Cache HIT cid: 7.0.0-commandfiles-1-4d4589c654b01ca711dc8471d98c0e08 [1.05 sec, 5.25 MB]               [debug]

Drush bootstrap phase : bootstrap_drupal_site() [1.07 sec, 5.26 MB]                                [bootstrap]

Initialized Drupal site default at sites/default [1.07 sec, 5.26 MB]                                  [notice]

Find command files for phase 2 (max=6) [1.17 sec, 5.26 MB]                                             [debug]

Cache HIT cid: 7.0.0-commandfiles-2-f17fc6bdab2f74278df75194ca483893 [1.17 sec, 5.26 MB]               [debug]

Drush bootstrap phase : bootstrap_drupal_configuration() [1.18 sec, 5.26 MB]                       [bootstrap]

Find command files for phase 3 (max=6) [1.18 sec, 5.27 MB]                                             [debug]

sql-query: SELECT 1; [1.19 sec, 5.39 MB]                                                              [status]

Executing: mysql --defaults-extra-file="C:\Users\[username]\AppData\Local\Temp\druFC47.tmp" --database=gccnewsdev --host=localhost --silent  < "C:\Users\[username]\AppData\Local\Temp\druFC46.tmp"
  1
Drush bootstrap phase : bootstrap_drupal_database() [1.3 sec, 5.39 MB]                             [bootstrap]

Successfully connected to the Drupal database. [1.31 sec, 5.93 MB]                                 [bootstrap]

Find command files for phase 4 (max=6) [1.31 sec, 5.93 MB]                                             [debug]

Drush bootstrap phase : bootstrap_drupal_full() [1.31 sec, 5.93 MB]                                [bootstrap]

Cache HIT cid: 7.0.0-install_profile-66ecfeb9791a023150773849f1550c5d [1.66 sec, 28.68 MB]             [debug]

Find command files for phase 5 (max=6) [1.66 sec, 28.68 MB]                                            [debug]

Cache HIT cid: 7.0.0-install_profile-66ecfeb9791a023150773849f1550c5d [1.66 sec, 28.68 MB]             [debug]

Cache HIT cid: 7.0.0-commandfiles-5-6046ef3049c5fa6ecece7eb50449dd57 [1.66 sec, 28.7 MB]               [debug]

Drush bootstrap phase : bootstrap_drupal_login() [1.69 sec, 29.35 MB]                              [bootstrap]

Find command files for phase 6 (max=6) [1.71 sec, 29.79 MB]                                            [debug]

Found command: pm-update (commandfile=pm) [1.71 sec, 29.79 MB]                                     [bootstrap]

Bootstrap to phase 6. [1.71 sec, 29.79 MB]                                                         [bootstrap]

Calling hook drush_pm_update [1.94 sec, 32.51 MB]                                                      [debug]

Bootstrap to phase 6. [1.94 sec, 32.55 MB]                                                         [bootstrap]

Loading release_info engine. [1.94 sec, 32.56 MB]                                                     [notice]

Loading version_control engine. [1.95 sec, 32.6 MB]                                                   [notice]

Loading package_handler engine. [1.95 sec, 32.62 MB]                                                  [notice]

Executing: wget --version
Loading update_status engine. [2.28 sec, 32.64 MB]                                                    [notice]

Including C:Users[username]AppDataLocalComposervendordrushdrushcommandspm/updatecode.pm.inc [bootstrap]

[2.29 sec, 32.72 MB]
Calling hook drush_pm_updatecode_validate [2.29 sec, 32.81 MB]                                         [debug]

Returned from hook drush_pm_updatecode_validate [2.29 sec, 32.81 MB]                                   [debug]

Calling hook drush_pm_updatecode [2.29 sec, 32.83 MB]                                                  [debug]

Cache MISS cid: 7.0.0-alias-path--3435207224f9913394154572a229f036 [2.3 sec, 32.86 MB]                 [debug]

Backend invoke: php.exe                                                                              [command]

"C:\Users\[username]\AppData\Local\Composer\vendor\drush\drush\drush.php" --php=php.exe
--backend=2 --verbose --debug --root="E:\htdocs\newsdev" --uri=http://default  pm-updatestatus
name 2>&1 [2.32 sec, 32.86 MB]
php.exe "C:\Users\[username]\AppData\Local\Composer\vendor\drush\drush\drush.php"               [notice]

--php=php.exe  --backend=2 --verbose --debug --root="E:\htdocs\newsdev" --uri=http://default
pm-updatestatus name 2>&1 [2.32 sec, 32.87 MB]
Obtaining views_bulk_operations project path. [33.21 sec, 35.71 MB]                                    [debug]

Obtaining admin_menu project path. [33.21 sec, 35.72 MB]                                               [debug]

Obtaining advanced_help project path. [33.21 sec, 35.72 MB]                                            [debug]

Obtaining backup_migrate project path. [33.21 sec, 35.72 MB]                                           [debug]

Obtaining block_class project path. [33.21 sec, 35.72 MB]                                              [debug]

Obtaining ctools project path. [33.22 sec, 35.72 MB]                                                   [debug]

Obtaining cas project path. [33.22 sec, 35.73 MB]                                                      [debug]

Obtaining cas_attributes project path. [33.22 sec, 35.73 MB]                                           [debug]

Obtaining ckeditor project path. [33.22 sec, 35.73 MB]                                                 [debug]

Obtaining conditional_styles project path. [33.22 sec, 35.73 MB]                                       [debug]

Obtaining date project path. [33.22 sec, 35.73 MB]                                                     [debug]

Obtaining devel project path. [33.22 sec, 35.74 MB]                                                    [debug]

Obtaining entity project path. [33.23 sec, 35.74 MB]                                                   [debug]

Obtaining features project path. [33.23 sec, 35.74 MB]                                                 [debug]

Obtaining features_override project path. [33.23 sec, 35.74 MB]                                        [debug]

Obtaining feeds project path. [33.23 sec, 35.74 MB]                                                    [debug]

Obtaining feeds_tamper project path. [33.23 sec, 35.75 MB]                                             [debug]

Obtaining field_group project path. [33.28 sec, 35.75 MB]                                              [debug]

Obtaining field_permissions project path. [33.28 sec, 35.75 MB]                                        [debug]

Obtaining file_entity project path. [33.28 sec, 35.75 MB]                                              [debug]

Obtaining flickr project path. [33.28 sec, 35.75 MB]                                                   [debug]

Obtaining gccnews project path. [33.28 sec, 35.76 MB]                                                  [debug]

Obtaining hierarchical_select project path. [33.29 sec, 35.76 MB]                                      [debug]

Obtaining job_scheduler project path. [33.29 sec, 35.76 MB]                                            [debug]

Obtaining jquery_update project path. [33.29 sec, 35.76 MB]                                            [debug]

Obtaining ldap project path. [33.29 sec, 35.77 MB]                                                     [debug]

Obtaining libraries project path. [33.29 sec, 35.77 MB]                                                [debug]

Obtaining logintoboggan project path. [33.29 sec, 35.77 MB]                                            [debug]

Obtaining media project path. [33.29 sec, 35.77 MB]                                                    [debug]

Obtaining media_ckeditor project path. [33.3 sec, 35.77 MB]                                            [debug]

Obtaining media_oembed project path. [33.3 sec, 35.77 MB]                                              [debug]

Obtaining module_filter project path. [33.3 sec, 35.78 MB]                                             [debug]

Obtaining name project path. [33.3 sec, 35.78 MB]                                                      [debug]

Obtaining pathauto project path. [33.3 sec, 35.78 MB]                                                  [debug]

Obtaining pathologic project path. [33.3 sec, 35.78 MB]                                                [debug]

Obtaining redirect project path. [33.3 sec, 35.78 MB]                                                  [debug]

Obtaining respondjs project path. [33.31 sec, 35.79 MB]                                                [debug]

Obtaining rules project path. [33.31 sec, 35.79 MB]                                                    [debug]

Obtaining taxonomy_container project path. [33.31 sec, 35.79 MB]                                       [debug]

Obtaining taxonomy_csv project path. [33.31 sec, 35.79 MB]                                             [debug]

Obtaining taxonomy_manager project path. [33.36 sec, 35.79 MB]                                         [debug]

Obtaining taxonomy_menu_block project path. [33.36 sec, 35.8 MB]                                       [debug]

Obtaining token project path. [33.36 sec, 35.8 MB]                                                     [debug]

Obtaining views project path. [33.36 sec, 35.8 MB]                                                     [debug]

Obtaining workbench project path. [33.36 sec, 35.8 MB]                                                 [debug]

Obtaining workbench_access project path. [33.37 sec, 35.8 MB]                                          [debug]

Obtaining workbench_email project path. [33.37 sec, 35.81 MB]                                          [debug]

Obtaining workbench_media project path. [33.37 sec, 35.81 MB]                                          [debug]

Obtaining workbench_moderation project path. [33.37 sec, 35.81 MB]                                     [debug]

Obtaining bootstrap project path. [33.37 sec, 35.81 MB]                                                [debug]

Update information last refreshed: Sun, 05/10/2015 - 4:13pm
  1
  GNU Wget 1.11.4

  Copyright (C) 2008 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later
  <http://www.gnu.org/licenses/gpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

  Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
  Currently maintained by Micah Cowan <micah@cowan.name>.
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:Program Files (x86)GnuWin32/etc/wgetrc
 Name               Installed Version  Proposed version  Message
 Name Field (name)  7.x-1.9            7.x-1.10          Update available


Code updates will be made to the following projects: Name Field [name-7.x-1.10]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Starting to update Name Field code at sites/all/modules/name... [59.32 sec, 34.56 MB]                 [notice]

Verifying signature for svn version control engine. [59.32 sec, 34.58 MB]                              [debug]

Executing: svn info "E:\htdocs\newsdev/sites/all/modules/name"
  'svn' is not recognized as an internal or external command,
  operable program or batch file.
Verifying signature for bzr version control engine. [59.44 sec, 34.57 MB]                              [debug]

Executing: bzr root "E:\htdocs\newsdev/sites/all/modules/name"
  'bzr' is not recognized as an internal or external command,
  operable program or batch file.
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 130968 bytes) in C:Users[username]AppDataLocalComposervendordrushdrushincludesfilesystem.inc on line 361

I also watched the performance monitor while the Drush command was executing. The behavior is very different depending on how much memory is allocated in drushrc.php:

  • if memory is set to a moderate fixed amount (for this trace, it was set to 512M), memory usage barely changes, and CPU usage spikes to 100% for several seconds at three points in the process: when the PHP executable is loaded, and at two others later in the process that it was hard to pin down.
  • if memory is set to unlimited, memory usage rapidly maxes out (the VM is currently allocated 4GB) and CPU maxes to 100% for the entire processing time, dipping below only when I’m being prompted for input and at a few other points. Eventually the system will either drop the remote desktop connection or spontaneously reboot.

drush sqlc import causing Mysql 1045 (28000) Error Acces. How to resolve it?

$
0
0

I’m trying to move a live Drupal 7.39 site to my local Acquia dev set up which installs Drupal 7.41.

I follow what I think is standard procedure, which is to get a clean install, copy my site’s sites folder, and then upload the database and run the update script.

I’m using the drush command drush sql-drop -y && drush sqlc < dump.sql. The first part of the command runs, the database tables are dropped, but then I get a 1045 error (28000) for my database user.

What perplexes me, is that the first part of the call works, but it fails in the second part. The sql file is too large to import through phpmyadmin, and I’m really dumbfounded here.

Should I update the live site to 7.41 before migrating it? I don’t want to do this because I don’t want to do updates on the live site.

What is causing this issue? I think it’s a conflict with the SQL settings in the settings.php file, but they match the database user and authentication but I don’t know enough about the guts of drush to figure out how to fix this.

How does Drupal handle update of multiple module bundles of features without breaking stuff?

$
0
0

Let’s say I have modules A, B and C.

I create a feature and it makes them into a single module.

Then one day, an update makes A, B and C not compatible, or maybe one deprecated or something.

Then my feature is broken…

Drush installs fresh modules of the newest version automatically, is there a way to do a drush command that bundles the modules inside the feature module?

How can I set an API key, which contains equal sign set at Drush site-install?

$
0
0

When I use the drush site-install command and a form value contains the equal sign (an API key for example), then Drush cuts the value at the equal sign. For example:

drush si -y profile_name
–account-name=…
–account-pass=…
–db-url=mysql:…
form_name.field_name=”e+gklgfssdk=jgfsfg/11iXP6VJM0MjDpRk2MEKyc=”

The value of the form_name.field_name at install will be “e+gklgfssdk”, the last characters are missing, Drush cuts the value at the equal sign. This is a bug? Or how can I set the correct value?

How do I import a database through a Drush(PHP) script?

$
0
0

I am trying to write a Drush script locally to speed up some repetitive tasks. I am running in to issues importing a database through the script. I have tried using drush_invoke and drush_invoke_process to run the equivalent of drush sql-cli < C:/path/to/mysql.sql.

I have tried several different variations with the $commandline_args and $commandline_arguments with no luck and Google has not been helping me much.

Does anyone have the correct syntax for this? I would also be fine with another method that works. I would prefer one that allows for a user input path to the SQL file but hard coded would work for now.

EDIT: I am using drush scr to run the script. Just in case it makes a difference.

EDIT 2: The accepted answer from greg_1_anderson works great. To allow for using the path to the file as an argument I found that drupal_get_option works. Just add the argument --arg_name=arg_value like drush scr script.php --file=path/to/file. Then call the arg in the script file.

Full solution:

$file = drush_get_option('file');
$options = array(
  'file' => $file,
  'file-delete' => FALSE,
  'strict' => FALSE,
);
drush_invoke_process($self, 'sql-query', array(), $options);

How do I link Drush to my Drupal Site on Pantheon?

$
0
0

A friend of mine got me into Drupal and did the initial setup for me. At first, I was using local host to play with Drupal and Drush to download and enable modules.

Now I have my own pantheon hosting site that lets me install Drupal on their side, but how do I link my drush command prompt to my online site? Before on local host, it was just a matter of changing directories, but how do I connect it for a site online?

Edit: This is for Drupal 7 .

need to clear fire cc all 2 times to get cache cleared

$
0
0

On my Mac I need to cc all 2 times to get cache cleared. The first try end up after a few seconds with no message and cache isn’t cleared. The second try need some more time and I get the “success” message.

I use drush 8.0.0-rc3, MAMP (MAC) and Drupal 7.41.

Does anyone a reason for that?


How to resolve drush error: the file name, directory name, or volume label syntax is incorrect

$
0
0

I’ve adding and removing modules with drush when something went wrong. I’m using the latest version of Acquia devdesktop and now when I run any drush command I get the error “the file name, directory name, or volume label syntax is incorrect.” This error seems to be specific to the site I am working on, as drush works outside of the site folder. How can I fix this?

UPDATE: so, I deleted what I thought were the offending folders but the problem persists.

Update2: ran the drush debug command and I didn’t see anything meaningful or diagnostic in the results.

Starting Drush preflight. [0.21 sec, 1.68 MB]                        [preflight]
Loading drushrc "C:Program FilesDev                                [bootstrap]
Desktopdrushvendordrushdrushdrushrc.php" into "drush" scope.
[0.22 sec, 1.69 MB]
Cache MISS cid:                                                          [debug]
8.0.0-rc1-commandfiles-0-d122bbeed82161c117b94e5f9e65d6f6 [0.33 sec,
1.72 MB]
Cache SET cid:                                                           [debug]
8.0.0-rc1-commandfiles-0-d122bbeed82161c117b94e5f9e65d6f6 [0.41 sec,
1.74 MB]
Scanning into C:ProgramData/Drush/etc/drush for                     [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.51 sec, 3.41 MB]
Scanning into C:ProgramData/Drush/etc/drush for                     [sitealias]
/self.alias.drush(8|)rc.php$/ [0.51 sec, 3.41 MB]
Scanning into C:Program FilesDev                                   [sitealias]
Desktopdrushvendordrushdrushincludes/.. for
/.*aliases.drush(8|)rc.php$/ [0.52 sec, 3.41 MB]
Scanning into C:Program FilesDev                                   [sitealias]
Desktopdrushvendordrushdrushincludes/.. for
/self.alias.drush(8|)rc.php$/ [0.62 sec, 3.42 MB]
Scanning into C:UsersNick/.drush for /.*aliases.drush(8|)rc.php$/[sitealias
[0.71 sec, 3.42 MB]
Scanning into C:UsersNick/.drush for                               [sitealias]
/self.alias.drush(8|)rc.php$/ [0.71 sec, 3.42 MB]
Scanning into C:UsersNick/.acquia/DevDesktop/Drush/Aliases for     [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.72 sec, 3.42 MB]
Scanning into C:UsersNick/.acquia/DevDesktop/Drush/Aliases for     [sitealias]
/self.alias.drush(8|)rc.php$/ [0.72 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/../drush for        [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.72 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/../drush for        [sitealias]
/self.alias.drush(8|)rc.php$/ [0.72 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/drush for           [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.73 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/drush for           [sitealias]
/self.alias.drush(8|)rc.php$/ [0.73 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/all/drush for [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.73 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/all/drush for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.73 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/default for   [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.73 sec, 3.42 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/default for   [sitealias]

/self.alias.drush(8|)rc.php$/ [0.73 sec, 3.43 MB]
Begin redispatch via drush_invoke_process(). [1.32 sec, 5.17 MB]        [notice]
Scanning into C:ProgramData/Drush/etc/drush for                     [sitealias]
/.*aliases.drush(8|)rc.php$/ [1.32 sec, 5.17 MB]
Scanning into C:ProgramData/Drush/etc/drush for                     [sitealias]
/self.alias.drush(8|)rc.php$/ [1.33 sec, 5.17 MB]
Scanning into C:Program FilesDev                                   [sitealias]
Desktopdrushvendordrushdrushincludes/.. for
/.*aliases.drush(8|)rc.php$/ [1.33 sec, 5.17 MB]
Scanning into C:Program FilesDev                                   [sitealias]
Desktopdrushvendordrushdrushincludes/.. for
/self.alias.drush(8|)rc.php$/ [1.41 sec, 5.17 MB]
Scanning into C:UsersNick/.drush for /.*aliases.drush(8|)rc.php$/[sitealias]
[1.5 sec, 5.17 MB]
Scanning into C:UsersNick/.drush for                               [sitealias]
/self.alias.drush(8|)rc.php$/ [1.5 sec, 5.17 MB]
Scanning into C:UsersNick/.acquia/DevDesktop/Drush/Aliases for     [sitealias]
/.*aliases.drush(8|)rc.php$/ [1.5 sec, 5.18 MB]
Scanning into C:UsersNick/.acquia/DevDesktop/Drush/Aliases for     [sitealias]
/self.alias.drush(8|)rc.php$/ [1.51 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/../drush for        [sitealias]
/.*aliases.drush(8|)rc.php$/ [1.51 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/../drush for        [sitealias]
/self.alias.drush(8|)rc.php$/ [1.51 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/drush for           [sitealias]
/.*aliases.drush(8|)rc.php$/ [1.51 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/drush for           [sitealias]
/self.alias.drush(8|)rc.php$/ [1.51 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/all/drush for [sitealias]
/.*aliases.drush(8|)rc.php$/ [1.52 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/all/drush for [sitealias]
/self.alias.drush(8|)rc.php$/ [1.52 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/default for   [sitealias] 
/.*aliases.drush(8|)rc.php$/ [1.52 sec, 5.18 MB]
Scanning into C:UsersNickSitesdevdesktoppsr/sites/default for   [sitealias]
/self.alias.drush(8|)rc.php$/ [1.52 sec, 5.18 MB]
Backend invoke: "C:\Users\Nick\Sites\devdesktop\psr\drush"       [command]
--root="C:\Users\Nick\Sites\devdesktop\psr" --local --debug
--verbose  core-status 2>&1 [1.53 sec, 5.19 MB]
Calling proc_open("C:\Users\Nick\Sites\devdesktop\psr\drush"  --root="C:\
Users\Nick\Sites\devdesktop\psr" --local --debug --verbose  core-status 2>&1
);
The filename, directory name, or volume label syntax is incorrect.
End redispatch via drush_invoke_process(). [1.55 sec, 5.18 MB]          [notice]

After installing drush over vagrant ssh, cannot connect to vagrant

$
0
0

I installed Drush over Vagrant SSH so that I could clear my local cache from the command line and now vagrant does not work at all. With every command I run for vagrant, I get ‘alias: drush: not found’. I also can’t connect to MySQL through vagrant anymore. I have no idea what to do.

Help installing Drush on Windows “The system cannot find the path specified” [on hold]

$
0
0

I’m new to Drupal and I’m going through a tutorial. I’m at the part where they’re explaining Drush, but I’m having problems getting it set up. I tried installing it globally and locally on my project but I get the same results. I’m running my site locally on XAMPP PHP version 5.6.15 and I’m using Drupal 8. I install Composer and everything works fine, I’m able to launch it from any directory. Then I follow all the instructions to install Drush, using Composer and everything goes smoothly as well. The problem is when I try to run the most basic Drush command I get a bunch of “The system cannot find the path specified” errors. I opened up the drush.bat file and made sure drush.php was being called, and it is. I think the problem is with the files being required in the preflight.inc file, but I’m not sure. Is there a log file I can view that will tell me what files are having problems being loaded?? Any help would be really appreciated.

Thanx!!

Does Drush 8 Supports Drupal 7 Now? [on hold]

$
0
0

I am bit confused with the latest Drush version. I have a server with several Drupal sites hosted on that. I want to install Drush globally on the server. But now there are several versions of Drush, and there was a news that the latest Drush version 8 does not supports Drupal 7 and 6.

Recently On Drush website http://docs.drush.org/en/master/install/ it is shown that Drush 8 is compatible with Drupal 6 and Drupal 7.

Does that really support Drupal 7 and 6?

Drush backup of multisite platform

$
0
0

Is there Drush command that can backup whole multisite platform:

  • database dump of each site
  • code of each site
  • backup of sites/all or complete core with sites/all
  • and all that in just ONE tar.gz

There is a archive-dump command which can backup whole platform code and database, but it does that for each site, and omitting other sites from its archive. And that is a problem because if you want to use that backup, and let’s say you have 3 sites in platform, you would have to untar 3 backups of each site, and then merge those so your /sites folder has all three sites there, instead only one per archive.

Second, less annoying problem with that command is, if you provide it argument @sites, it will try to backup default site as well, which is not used on Aegir.

Updating a drush command from drush 7 to drush 8 [closed]

$
0
0

what to do if there is a drush command file worked with drush 7 but doesn’t work with drush 8. The official docs seem not to have an upgrade guide for this.

Drush archive-dump override sql dump name

$
0
0

Is there a way to use drush archive-dump but to pass it somehow the name of sql file it dumps into archive? Current name is too long (full path with dots instead / and # to separate path and site name) and not as useful so I would love to override its name (like I can do with tar.gz name with --destination parameter)


How to properly call drush command from another drush command?

$
0
0

I have a drush command that does some stuff and at the end of its execution I want to invoke twig-compile --uri=foobar.com. When I call drush_invoke('twig-compile') I get error about unknown arguments(those were passed to my drush command). I tried things like this before invoking the command drush_set_context('options', ['uri', 'foobar.com']); but no success yet.

How should I reset the options so twigc won’t complain about them or how do I invoke the twigc command directly with the uri argument?

Which version of Drush should I install?

$
0
0

Drush 6 works great of corse on a Drupal 6 website, but will I have all of the Drush 6 features when working on a Drupal 7 website? Should I use Drush 7 when working on a drupal 7 website?

I found this post that says you can switch between the two version easily, is this correct?

switch to drush6 command:
composer global require drush/drush:6.*

switch to drush7 command:
composer global require drush/drush:dev-master

Is possible to transfer files with FTP? [closed]

$
0
0

I connected to a site using SSH with Drush. Is there a way to use FTP with Drush?

Why does nothing change when I attempt to restore a backup?

$
0
0

I have a drupal 7.43 installation and it has been doing regular backups using the Backup and Restore module. I wanted to do a restore but I’m blocked at every turn it seems. I go to Configuration >> System >> Backup and Migrate >> Saved Backups and click on “restore” next to the one I want to restore from. I get a new page where I choose “Entire Site” to restore to, as that is what I’m backing up, and then click “Restore.” That takes me to a white page. When I reload my site, nothing has changed, so I assume this means failure, although I have no way of knowing what failed or why that I can tell.

So I tried drush:

drush bam-restore archive scheduled drupal.xxxxx.net-2016-03-21T09-44-17.sitearchive.tar.gz

This gave me a mysterious error:

Restoring will delete some or all of your data and cannot be undone. ALWAYS TEST YOUR BACKUPS ON A NON-PRODUCTION SERVER!
Are you sure you want to perform the restore? (y/n): y
PHP Fatal error: Call to undefined function file_directory_path() in /var/www/drupal.wealthychef.net/public_html/sites/all/modules/backup_migrate/includes/sources.archivesource.inc on line 211
Drush command terminated abnormally due to an unrecoverable error.
Error: Call to undefined function file_directory_path() in
/var/www/drupal.wealthychef.net/public_html/sites/all/modules/backup_migrate/includes/sources.archivesource.inc,
line 211

Can someone help me understand how to restore my site?

How to use drush with proxy [closed]

$
0
0

I am using Acquia Dev Desktop 2 for my Drupal 8 project, I tried to download module with Drush. But I can only access the internet via a proxy. How can I configure drush to use the correct http proxy settings for downloading?

Viewing all 72 articles
Browse latest View live