SlideShare a Scribd company logo
1 of 22
Drupal DTP Deployment  Troubles and Problems 6.x 	@landike (Andrii Lundiak)
Deployment steps
Steps level
What we have today to discuss Hosting environment worries First install steps Magic php.ini This very helpful .htaccess file We all like settings.php Strange unbelievable error messages or  Let find more Troubles and more Problems and Ways how to fix them.
Useful MySQL stuff ,[object Object]
mysql -h DBSERVER -p  -u username dbname < dbname.sql
mysqldump-u username -p dbname > dbname.sql
mysql -h DBSERVER -p -u username dbname > dbname.sql Usemysql.cnffile to run easier #--------------- [client] user = myuser password = mypass host = DBSERVER [mysql] database = dbname #------------- mysql< dbname.sql
Log Files It's good to know what we have on hosting server and especially where Log files are.  To access the files directly on the server, on some Unix shells, you can type the following command: tail -f /var/log/apache2/error.log To check that you are looking at the right file, you may wish to type the following commands to find where the log files are. grep 'ErrorLog' /etc/apache2/* grep 'ErrorLog' /etc/apache2/*/*
Error Reporting If error reporting is turned off, you could be getting a fatal error but not seeing it. On a production site, it is common to have error reporting turned off. Take care to have in index.php:error_reporting(E_ALL);ini_set('display_errors', TRUE);ini_set('display_startup_errors', TRUE); this will help in debug/test mode
Install and Go Create Database … and enjoy easy installation If some php settings are not in properly state, install process will tell you (about register_globals, mbstring.http_output, safe_mode, etc.)
php.ini magician How to override php settings: value of a configuration option in php.ini .htaccess directives using ini_set() in settings.php or  use control panel on your hosting server or call to admin person or change hosting server 
Another way to override If you have access to php.ini it’s AWESOME, and It’s great if you have your own php.ini near by www On some hosting servers such kind of option is used to enable using local php.ini file: ssuPHP_ConfigPath /hsphere/local/home/sitelocation This setting must be located in .htaccess file And php.ini file must exists in /hsphere/local/home/sitelocation/php.ini
Allowed memory size … Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)... Increase PHP's memory limit, up to 16MB or 24M or 32MB or especially 96MB for a site with built-in image processing using ImageAPI GD memory_limit = 16M in your php.ini file.  or php_valuememory_limit 16Min your .htaccessfile or ini_set('memory_limit', '16M'); in your settings.php file ???
Execution time of 30s exceeded “Fatal error: Maximum execution time of 30 seconds exceeded in ….ncludesatabase.mysql.inc on line XXX” The default PHP timeout defined in php.ini is 30 seconds. This is too short for some activities like listing/enabling modules. max_execution_time 120; (php.ini) php_valuemax_execution_time 120 (.htaccess) ini_set(‘max_execution_time’, ‘120’) (settings.php) Set “max_execution_time “ = 3000 and Enjoy  (is very useful in testing stage)
Dear friend - .htaccess .htaccess was not uploaded (Access Denied message, Disabled Clean urls) ,[object Object],“PHP:  Error parsing …” - () was in .htaccess comments http://example.com -> http://www.example.com ,[object Object]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] http://www.example.com -> http://example.com ,[object Object]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301],[object Object]
This option is used in CKFinder configuring
Do not miss it, going from dev-server to production-serverTake care about file permission and $db_url and $update_free_access Don’t forget, if you have $db_prefix, you should use {table} in SQL query build
WSOD (White Screen Of Death) "Invisible" Errors or Blank Pages, how to fix: SELECT * FROM watchdog LIMIT 20; Easy manual quick-fixing  ,[object Object],Dtools ,[object Object],Increase CPU limit on hosting server ,[object Object],[object Object]
God, bless IDEs, which remove trailing whitespace. Or you should take care with your coding “You are not authorized to access this page” ,[object Object]

More Related Content

What's hot

Drupalxamppxp 1229687989691791 1
Drupalxamppxp 1229687989691791 1Drupalxamppxp 1229687989691791 1
Drupalxamppxp 1229687989691791 1
beckman16
 
Drupal debugging tips
Drupal debugging tipsDrupal debugging tips
Drupal debugging tips
Adolfo Nasol
 
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Drush. Why should it be used?
Drush. Why should it be used?Drush. Why should it be used?
Drush. Why should it be used?
Sergei Stryukov
 

What's hot (20)

A WordPress workshop at Cefalo
A WordPress workshop at Cefalo A WordPress workshop at Cefalo
A WordPress workshop at Cefalo
 
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
 
HPPG - high performance photo gallery
HPPG - high performance photo galleryHPPG - high performance photo gallery
HPPG - high performance photo gallery
 
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cliWordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
 
Hppg
HppgHppg
Hppg
 
Drupalxamppxp 1229687989691791 1
Drupalxamppxp 1229687989691791 1Drupalxamppxp 1229687989691791 1
Drupalxamppxp 1229687989691791 1
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cli
 
Drupal debugging tips
Drupal debugging tipsDrupal debugging tips
Drupal debugging tips
 
Drupal
DrupalDrupal
Drupal
 
Lightning Fast Drupal Theming (Drupal 7)
Lightning Fast Drupal Theming (Drupal 7)Lightning Fast Drupal Theming (Drupal 7)
Lightning Fast Drupal Theming (Drupal 7)
 
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
 
Get Started With Drupal
Get Started With DrupalGet Started With Drupal
Get Started With Drupal
 
Front end performance optimization
Front end performance optimizationFront end performance optimization
Front end performance optimization
 
Drush. Why should it be used?
Drush. Why should it be used?Drush. Why should it be used?
Drush. Why should it be used?
 
Front end performance tip
Front end performance tipFront end performance tip
Front end performance tip
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Development
 
Front End Performance
Front End PerformanceFront End Performance
Front End Performance
 
Drupalcampatl d7
Drupalcampatl d7Drupalcampatl d7
Drupalcampatl d7
 
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrid
 

Viewers also liked

Workshop: Drupal para Bioinformática
Workshop: Drupal para BioinformáticaWorkshop: Drupal para Bioinformática
Workshop: Drupal para Bioinformática
introfini
 

Viewers also liked (20)

Foundation of starting your drupal project to vagrant environment
Foundation of starting your drupal project to vagrant environmentFoundation of starting your drupal project to vagrant environment
Foundation of starting your drupal project to vagrant environment
 
DevOps and Drupal
DevOps and DrupalDevOps and Drupal
DevOps and Drupal
 
Drupal Deployment
Drupal DeploymentDrupal Deployment
Drupal Deployment
 
DevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentDevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal Deployment
 
Devops For Drupal
Devops  For DrupalDevops  For Drupal
Devops For Drupal
 
Automated Drupal deployment with Git and Capistrano
Automated Drupal deployment with Git and CapistranoAutomated Drupal deployment with Git and Capistrano
Automated Drupal deployment with Git and Capistrano
 
Drupal Pilipinas Apprentice: LAMP Administration, CSS, and Vagrant
Drupal Pilipinas Apprentice: LAMP Administration, CSS, and VagrantDrupal Pilipinas Apprentice: LAMP Administration, CSS, and Vagrant
Drupal Pilipinas Apprentice: LAMP Administration, CSS, and Vagrant
 
Workshop: Drupal para Bioinformática
Workshop: Drupal para BioinformáticaWorkshop: Drupal para Bioinformática
Workshop: Drupal para Bioinformática
 
Drupal Security Hardening
Drupal Security HardeningDrupal Security Hardening
Drupal Security Hardening
 
Automating Drupal Deployment
Automating Drupal DeploymentAutomating Drupal Deployment
Automating Drupal Deployment
 
Drupal Deployment and Essential Development Tools - 2nd Edition
Drupal Deployment and Essential Development Tools - 2nd EditionDrupal Deployment and Essential Development Tools - 2nd Edition
Drupal Deployment and Essential Development Tools - 2nd Edition
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Drupal development, deployment, and automation with Puppet
Drupal development, deployment, and automation with PuppetDrupal development, deployment, and automation with Puppet
Drupal development, deployment, and automation with Puppet
 
Ansible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps MatchAnsible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps Match
 
Ansible for Drupal infrastructure and deployments
Ansible for Drupal infrastructure and deploymentsAnsible for Drupal infrastructure and deployments
Ansible for Drupal infrastructure and deployments
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
 
ProTips for Staying Sane while Working from Home
ProTips for Staying Sane while Working from Home ProTips for Staying Sane while Working from Home
ProTips for Staying Sane while Working from Home
 
Drupal Deployment
Drupal DeploymentDrupal Deployment
Drupal Deployment
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
 
Ci. Drupal Camp Berlin 2014
Ci. Drupal Camp Berlin 2014Ci. Drupal Camp Berlin 2014
Ci. Drupal Camp Berlin 2014
 

Similar to Drupal Deployment Troubles and Problems

How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
DrupalCampDN
 
Drupal Multisite Setup
Drupal Multisite SetupDrupal Multisite Setup
Drupal Multisite Setup
ipsitamishra
 

Similar to Drupal Deployment Troubles and Problems (20)

Drupal on your laptop
Drupal on your laptopDrupal on your laptop
Drupal on your laptop
 
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformDrupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Download It
Download ItDownload It
Download It
 
Network Manual
Network ManualNetwork Manual
Network Manual
 
Drupal from scratch
Drupal from scratchDrupal from scratch
Drupal from scratch
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OS
 
Apache
ApacheApache
Apache
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
 
Drupal Multisite Setup
Drupal Multisite SetupDrupal Multisite Setup
Drupal Multisite Setup
 

More from Andrii Lundiak

More from Andrii Lundiak (8)

React JS & Functional Programming Principles
React JS & Functional Programming PrinciplesReact JS & Functional Programming Principles
React JS & Functional Programming Principles
 
Create ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm packageCreate ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm package
 
Node js packages [#howto with npm]
Node js packages [#howto with npm]Node js packages [#howto with npm]
Node js packages [#howto with npm]
 
Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]
 
Grunt Delicious
Grunt DeliciousGrunt Delicious
Grunt Delicious
 
Mockups & Requirements [ITdeya @ IF_IT_S]
Mockups & Requirements [ITdeya @ IF_IT_S]Mockups & Requirements [ITdeya @ IF_IT_S]
Mockups & Requirements [ITdeya @ IF_IT_S]
 
Drupal Vs Other
Drupal Vs OtherDrupal Vs Other
Drupal Vs Other
 
Election
ElectionElection
Election
 

Drupal Deployment Troubles and Problems

  • 1. Drupal DTP Deployment Troubles and Problems 6.x @landike (Andrii Lundiak)
  • 4. What we have today to discuss Hosting environment worries First install steps Magic php.ini This very helpful .htaccess file We all like settings.php Strange unbelievable error messages or Let find more Troubles and more Problems and Ways how to fix them.
  • 5.
  • 6. mysql -h DBSERVER -p -u username dbname < dbname.sql
  • 7. mysqldump-u username -p dbname > dbname.sql
  • 8. mysql -h DBSERVER -p -u username dbname > dbname.sql Usemysql.cnffile to run easier #--------------- [client] user = myuser password = mypass host = DBSERVER [mysql] database = dbname #------------- mysql< dbname.sql
  • 9. Log Files It's good to know what we have on hosting server and especially where Log files are. To access the files directly on the server, on some Unix shells, you can type the following command: tail -f /var/log/apache2/error.log To check that you are looking at the right file, you may wish to type the following commands to find where the log files are. grep 'ErrorLog' /etc/apache2/* grep 'ErrorLog' /etc/apache2/*/*
  • 10. Error Reporting If error reporting is turned off, you could be getting a fatal error but not seeing it. On a production site, it is common to have error reporting turned off. Take care to have in index.php:error_reporting(E_ALL);ini_set('display_errors', TRUE);ini_set('display_startup_errors', TRUE); this will help in debug/test mode
  • 11. Install and Go Create Database … and enjoy easy installation If some php settings are not in properly state, install process will tell you (about register_globals, mbstring.http_output, safe_mode, etc.)
  • 12. php.ini magician How to override php settings: value of a configuration option in php.ini .htaccess directives using ini_set() in settings.php or use control panel on your hosting server or call to admin person or change hosting server 
  • 13. Another way to override If you have access to php.ini it’s AWESOME, and It’s great if you have your own php.ini near by www On some hosting servers such kind of option is used to enable using local php.ini file: ssuPHP_ConfigPath /hsphere/local/home/sitelocation This setting must be located in .htaccess file And php.ini file must exists in /hsphere/local/home/sitelocation/php.ini
  • 14. Allowed memory size … Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)... Increase PHP's memory limit, up to 16MB or 24M or 32MB or especially 96MB for a site with built-in image processing using ImageAPI GD memory_limit = 16M in your php.ini file. or php_valuememory_limit 16Min your .htaccessfile or ini_set('memory_limit', '16M'); in your settings.php file ???
  • 15. Execution time of 30s exceeded “Fatal error: Maximum execution time of 30 seconds exceeded in ….ncludesatabase.mysql.inc on line XXX” The default PHP timeout defined in php.ini is 30 seconds. This is too short for some activities like listing/enabling modules. max_execution_time 120; (php.ini) php_valuemax_execution_time 120 (.htaccess) ini_set(‘max_execution_time’, ‘120’) (settings.php) Set “max_execution_time “ = 3000 and Enjoy  (is very useful in testing stage)
  • 16.
  • 17.
  • 18.
  • 19. This option is used in CKFinder configuring
  • 20. Do not miss it, going from dev-server to production-serverTake care about file permission and $db_url and $update_free_access Don’t forget, if you have $db_prefix, you should use {table} in SQL query build
  • 21.
  • 22.
  • 24. admin/build/themes on slow hostingTo fix this issue: call drupal_flush_all_caches(); anywhere
  • 25. Disabling Modules Via the Module Administration Page in the UI Administer > Site Building > Modules … Uncheck and Save Via the Database If your WSOD is caused by a specific module and you cannot access the module admin page, go to system table, set status to 0 and then clear the cache table
  • 26. You should have cron There are many ways to configure cron (curl, lynx, wget, even GET), but … Here is real “drupal” way: Change file permission for scripts/drupal.sh (chmoda+x scripts/drupal.sh) Use in crontab file (or in Hosting Control Panel) this command: /home/account/www/scripts/drupal.sh --root /home/account/www http://default/cron.php PS. Cron is used by many modules: Update, Event, Aggregator, Search, Notifications, Send, Image watermark, Watchdog and other which must run time-related tasks.
  • 27.
  • 29. JavaScript/AJAX/XMLHttpRequest errorsThese actions would be great to do before/during/after deployment: TRUNCATE TABLE watchdog; drupal_flush_all_caches(); or “Clear Cached Data” "Rebuild Permissions" in Post Settings page “Re-Index site”
  • 30. Think at first || rapid development Masquarade module Transliteration Devel/Themer module Drush module “TEASER break” button in rich editor an Node-System Use professional IDE
  • 31.