Troubleshooting Drupal
From TroubleshootingWiki
| Official Page |
| Project Documentation |
| Download |
|
In this section, we will take a look at two of the problems most likely to occur during the setup process of Drupal. We will also take a look at how they manifest themselves and how to solve them quickly. It should be noted that at this early stage, there are not many things that can go wrong as the installation routine is fairly well used. This is good news because it is likely that any errors are the result of typos or something quite simple, which should be easy to rectify.
Unfortunately, we can't hope to cover absolutely everything in this section; so we will also outline a brief process that can be used to solve any problem, and not just the ones involved with installation. Having a sound process to follow is immeasurably more valuable than being shown solutions to each and every problem.
If, while setting up the database, you received a message like the one shown in the following screenshot:
It is likely that you have made a typo in the Databasename field, or have not correctly created a new database for Drupal to use. Check that you have not made a typo and that you have created a database with the desired name by revisiting http://localhost/phpmyadmin.
You might also have come across this rather ugly looking message towards the end of the installation process, as shown in the following screenshot: This error occurs when Drupal attempts to send an email to confirm that the site has been set up, but finds that it is unable to do so. This problem is not critical because it doesn't prevent Drupal from completing its installation, but obviously, you would
like the system to be able to send emails because they are useful for testing (and, of course, if you forget your password). The problem here is related to the environment itself and is not specifically a Drupal one.
PHP has reported to Drupal that it is not able to send out the email because it cannot find a suitable SMTP server. This is a common problem on Windows installations because unless an SMTP server is specified, there is no way PHP can decide for itself. To rectify this, open up the php.ini file located in C:\windows and search for the [mail function] entries. Modify it to match an SMTP server that you have access to (for example, if you use Outlook, you can find the address of an SMTP server from viewing your account server settings):
[mail function] ; For Win32 only. SMTP = mail.mysmtpserver.com smtp_port = 25
Once you have made the relevant changes, save the file and then restart the Apache server so that it can pick up the new settings.
Restart the Apache server by opening up the Apache2TriadManagerfrom the start menu and clicking the red icon next to Apache2. Once the server has stopped, simply click the icon again to restart.
But what if something else has gone wrong? Two more common problems are:
Clean URLs if in any doubt, don't enable these, because this can cause great problems after deployment to the live site if the live site does not support them by default.
Permission issues the settings.php file in sites/default makes use of certain properties of PHP and it is possible that there are conflicts here. Follow the instructions provided in the comments of this file if you suspect the problem lies here:
Note - To see what PHP settings are possible, including whether they can be set at runtime (ie., when ini_set() occurs), read the PHP documentation at http://www.php.net/manual/en/ini.php#ini.list and take a look at the .htaccess file to see which non-runtime settings are used there. Settings defined here should not be duplicated there so as to avoid conflict issues.
Further than this, the types of problems that can occur are not easily isolated; so we have outlined how to go about solving them. The following list of points highlight a process that can be used to troubleshoot any problems:
- Scrutinize any error messages you get and attempt to solve the problem yourself.
- Visit the Drupal forums and search for similar problems.
- Look through the troubleshooting FAQ at http://drupal.org/node/199.
- View the bug list (http://drupal.org/project/issues) to see if your problem is a reported bug.
- If you can't find bugs, similar posts, or problems, then try posting a focused and informative query on the forums and ask someone in the community to lend a hand.
- To supplement this, get on Google and try using relevant keywords to locate a similar problem, hopefully with a solution presented.
[edit] Additional References
- For instructions on customizing Drupal 6 themes, click here
- For instructions on Setting Up The Development Environment for Drupal 6, click here
- For instructions on Installing Drupal, click here
- For instructions on Building Drupal themes, click here
- For Theming Drupal,click here
- For instructions on Customizing Drupal Theme- CSS , click here
- For instructions on Advanced Theming on Drupal Multimedia , click here
- For instructions on Creating and Customizing Drupal 6 Themes,click here
- For instructions on Theming Drupal6, click here
- For instructions on Theming Drupal 5 Views Recipes, click here
- For instructions on Setting up Drupal for web services, click here
- For instructions on Installing Drupal Views Module , click here
[edit] Source
The source of this content is Chapter 2: Setting Up the Development Environment of Drupal 6 by David Mercer (Packt Publishing, 2008.)

