READ: https://www.drupal.org/docs/7/install
CREATE LOCAL SETUP
CREATE A CONF
|
1 |
sudo gedit /etc/apache2/sites-available/drupal723.test.conf |
CONTENT
|
1 2 3 4 5 6 7 8 9 10 11 12 |
<VirtualHost drupal723.test:80> ServerName www.drupal723.test DocumentRoot "/home/satria/Documents/projects/drupal723" DirectoryIndex index.php <Directory "/home/satria/Documents/projects/drupal723"> AllowOverride All Allow from All Require all granted </Directory> ErrorLog /var/log/apache2/drupal723.error.log CustomLog /var/log/apache2/drupal723.access.log combined </VirtualHost> |
ENABLE THE VIRTUALHOST
|
1 |
sudo a2ensite drupal723.test.conf |
RELOAD APACHE2
|
1 |
sudo systemctl reload apache2 |
CREATE THE HOST
|
1 2 3 |
sudo gedit /etc/hosts 127.0.0.1 drupal723.test |
RELOAD APACHE2
OPEN: http://drupal723.test/
–> BUT ALMOST BLANK PAGE WITH THIS MESSAGE
|
1 2 |
< /> < /> < /> < /> < /> < /> < /> < /> < /> Skip to main content |
INSTALL DRUSH
READ: https://drupalize.me/tutorial/install-drush-using-composer
USE COMPOSER
|
1 |
satria@teddy:~/Documents/projects/drupal723$ composer require --dev drush/drush |
BUT WHEN I TRIED TO CHECK THE DRUSH VERSION ‘drush –version’, I GOT THIS ERROR
|
1 2 3 4 |
satria@teddy:~/Documents/projects/drupal723$ ./vendor/bin/drush --version PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( PHP Fatal error: Uncaught Error: Class 'Symfony\Component\HttpKernel\Kernel' not found in /home/satria/Documents/projects/drupal723/vendor/drush/drush/src/Preflight/Preflight.php:209 |
I ALSO TRIED TO INSTALL IT BY DOWNLOAD IT MANUALLY
|
1 2 3 4 5 |
satria@teddy:~/Documents/projects/drupal723$ wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar satria@teddy:~/Documents/projects/drupal723$ sudo chmod +x drush.phar satria@teddy:~/Documents/projects/drupal723$ sudo mv drush.phar /usr/local/bin/drush |
THEN CHECK THE VERSION
|
1 2 3 4 5 6 7 |
satria@teddy:~/Documents/projects/drupal723$ drush --version PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( Drush Launcher Version: 0.10.2 The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following: - Navigate to any where within your Drupal project and try again. - Add --root=/path/to/drupal so Drush knows where your site is located. |
THE DRUSH VERSION IS 0.10.2, BUT IT ALWAYS ASKED THE DRUPAL PATH
I TRIED TO USE DRUSH LAUNCHER
|
1 |
satria@teddy:~/Documents/projects/drupal723$ export DRUSH_LAUNCHER_FALLBACK=/usr/local/bin/drush |
–> REMEMBER: AFTER RUN THE COMMAND, YOU NEED TO CLOSE THE TERMINAL AND OPEN IT AGAIN. IF NOT THE TERMINAL WOULD SHOW MANY REPEATED MESSAGES!!!
BUT STILL ASKED FOR THE DRUPAL PATH!
I MODIFIED composer.json LIKE THIS
|
1 2 3 4 5 6 7 8 9 10 |
{ "require-dev": { "drush/drush": "^11.6" }, "extra": { "installer-paths": { "core": ["type:drupal-core"] } } } |
THEN RUN ‘composer install’
THEN CHECK IT AGAIN
|
1 2 3 4 5 |
satria@teddy:~/Documents/projects/drupal723$ drush self-update PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( Drush Launcher Version: 0.10.2 PHP Fatal error: Uncaught Humbug\SelfUpdate\Exception\FilesystemException: The directory is not writeable: /usr/local/bin. in phar:///usr/local/bin/drush/vendor/laravel-zero/phar-updater/src/Updater.php:505 |
AND IT SHOWED ANOTHER ERROR –> OK. THE COMMAND SHOULD BE ‘sudo drush self-update’
BUT AFTER THAT, IT STILL ASKED THE PATH.
AFTER ‘composer install’
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
satria@teddy:~/Documents/projects/drupal723$ drush --debug PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( Drush Launcher Version: 0.10.2 ROOT: /home/satria/Documents/projects/drupal723 PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Drush Launcher Version: 0.10.2 ROOT: /home/satria/Documents/projects/drupal723 DRUSH VERSION: 11 DRUPAL ROOT: /home/satria/Documents/projects/drupal723 COMPOSER ROOT: /home/satria/Documents/projects/drupal723 VENDOR ROOT: /home/satria/Documents/projects/drupal723/vendor [preflight] Config paths: /home/satria/Documents/projects/drupal723/vendor/drush/drush/drush.yml [preflight] Alias paths: /home/satria/Documents/projects/drupal723/drush/sites,/home/satria/Documents/projects/drush/sites [preflight] Commandfile search paths: /home/satria/Documents/projects/drupal723/vendor/drush/drush/src PHP Fatal error: Uncaught Error: Class 'Symfony\Component\HttpKernel\Kernel' not found in /home/satria/Documents/projects/drupal723/vendor/drush/drush/src/Preflight/Preflight.php:209 |
IT SHOWED THE ABOVE ERROR
SOLUTION:
RUN THIS
|
1 |
satria@teddy:~/Documents/projects/drupal723$ composer require symfony/http-kernel -W |
THEN IT SHOWED THE CORRECT OUTPUT
|
1 2 3 4 5 6 7 |
satria@teddy:~/Documents/projects/drupal723$ drush --version PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( Drush Launcher Version: 0.10.2 PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Drush Launcher Version: 0.10.2 Drush Commandline Tool 11.6.0 |
I TRIED TO CLEAR THE CACHE
READ: https://www.drupal.org/docs/7/administering-drupal-7-site/clearing-or-rebuilding-drupals-cache
BUT GOT THESE ERRORS
|
1 2 3 4 5 6 7 8 9 |
satria@teddy:~/Documents/projects/drupal723$ drush cc all PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( PHP Warning: Module 'imagick' already loaded in Unknown on line 0 In CacheCommands.php line 243: `cache-clear all` is deprecated for Drupal 8 and later. Please use the `cac he:rebuild` command instead. |
OR
|
1 2 3 4 5 6 7 8 |
satria@teddy:~/Documents/projects/drupal723$ drush cache-rebuild PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( PHP Warning: Module 'imagick' already loaded in Unknown on line 0 In BootstrapHook.php line 36: Bootstrap failed. Run your command with -vvv for more information. |
EVEN
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
satria@teddy:~/Documents/projects/drupal723$ drush cache-rebuild -vvv PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( Box Requirements Checker ======================== > Using PHP 7.4.33 > PHP is using the following php.ini file: /etc/php/7.4/cli/php.ini > Checking Box requirements: ✔ The package "composer/xdebug-handler" requires the version "^5.3.2 || ^7.0 || ^8.0" or greater. ✔ The package "laravel-zero/phar-updater" requires the version "^7.3|^8.0" or greater. ✔ The package "psr/log" requires the version ">=5.3.0" or greater. ✔ The package "webmozart/assert" requires the version "^7.2 || ^8.0" or greater. ✔ The package "webmozart/path-util" requires the version ">=5.3.3" or greater. ✔ The package "webflo/drupal-finder" requires the extension "json". ✔ The package "webmozart/assert" requires the extension "ctype". [OK] Your system is ready to run the application. PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Box Requirements Checker ======================== > Using PHP 7.4.33 > PHP is using the following php.ini file: /tmp/4Ww81P > Checking Box requirements: ✔ The package "composer/xdebug-handler" requires the version "^5.3.2 || ^7.0 || ^8.0" or greater. ✔ The package "laravel-zero/phar-updater" requires the version "^7.3|^8.0" or greater. ✔ The package "psr/log" requires the version ">=5.3.0" or greater. ✔ The package "webmozart/assert" requires the version "^7.2 || ^8.0" or greater. ✔ The package "webmozart/path-util" requires the version ">=5.3.3" or greater. ✔ The package "webflo/drupal-finder" requires the extension "json". ✔ The package "webmozart/assert" requires the extension "ctype". [OK] Your system is ready to run the application. [preflight] Config paths: /home/satria/Documents/projects/drupal723/vendor/drush/drush/drush.yml [preflight] Alias paths: /home/satria/Documents/projects/drupal723/drush/sites,/home/satria/Documents/projects/drush/sites [preflight] Commandfile search paths: /home/satria/Documents/projects/drupal723/vendor/drush/drush/src [info] Starting bootstrap to site [0.05 sec, 8.74 MB] In BootstrapHook.php line 36: [Exception] Bootstrap failed. Run your command with -vvv for more information. Exception trace: at /home/satria/Documents/projects/drupal723/vendor/drush/drush/src/Boot/BootstrapHook.php:36 Drush\Boot\BootstrapHook->initialize() at /home/satria/Documents/projects/drupal723/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook() at /home/satria/Documents/projects/drupal723/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /home/satria/Documents/projects/drupal723/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /home/satria/Documents/projects/drupal723/vendor/consolidation/annotated-command/src/CommandProcessor.php:145 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /home/satria/Documents/projects/drupal723/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:376 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /home/satria/Documents/projects/drupal723/vendor/symfony/console/Command/Command.php:264 Symfony\Component\Console\Command\Command->run() at /home/satria/Documents/projects/drupal723/vendor/symfony/console/Application.php:1058 Symfony\Component\Console\Application->doRunCommand() at /home/satria/Documents/projects/drupal723/vendor/symfony/console/Application.php:301 Symfony\Component\Console\Application->doRun() at /home/satria/Documents/projects/drupal723/vendor/symfony/console/Application.php:171 Symfony\Component\Console\Application->run() at /home/satria/Documents/projects/drupal723/vendor/drush/drush/src/Runtime/Runtime.php:124 Drush\Runtime\Runtime->doRun() at /home/satria/Documents/projects/drupal723/vendor/drush/drush/src/Runtime/Runtime.php:51 Drush\Runtime\Runtime->run() at /home/satria/Documents/projects/drupal723/vendor/drush/drush/drush.php:79 require() at /home/satria/Documents/projects/drupal723/vendor/drush/drush/includes/preflight.inc:18 drush_main() at phar:///usr/local/bin/drush/bin/drush.php:143 require() at /usr/local/bin/drush:14 |
ONLY WORKED LIKE THIS???
|
1 2 3 4 5 6 7 8 9 10 |
satria@teddy:~/Documents/projects/drupal723$ drush cc PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Choose a cache to clear [all]: [0] drush > 0 [success] 'drush' cache was cleared. |
BACK TO OPEN: http://drupal723.test/
–> BUT ALMOST BLANK PAGE WITH THIS MESSAGE
|
1 2 |
< /> < /> < /> < /> < /> < /> < /> < /> < /> Skip to main content |
I NEED TO REINSTALL/UPDATE DRUPAL BY OPENING http://drupal723.test/update.php
THEN I GOT ACCESS DENIED AND ERROR MESSAGES
SO I NEED TO MODIFY sites/default/settings.php AND CHANGED THIS SETTING FROM ‘FALSE’ TO ‘TRUE’ LIKE THIS
|
1 |
$update_free_access = TRUE; |
THEN OPEN IT AGAIN http://drupal723.test/update.php
AND GOT THE OTHER ERRORS ABOUT php.ini, SO MODIFIED
|
1 |
sudo gedit /etc/php/7.4/apache2/php.ini |
AND SET :
|
1 2 3 4 5 6 7 8 9 |
;mbstring.http_input = to mbstring.http_input = pass AND ;mbstring.http_output = to mbstring.http_output = pass |
THEN RESTART APACHE
|
1 |
sudo systemctl restart apache2 |