Enabling mod_rewrite on fedora system with drupal

After deploying drupal on a test machine, and configuring the site, the deployment got stuck when I wanted to enable clean urls, but the check kept failing saying the the machine was not configured properly for clean urls. Most documentation on the internet and on the drupal documentation itself seems to be for debian based distros.

However the problem seemed to be that my drupal was installed on a subdirectory as a virtual host and a simple rewritebase /drupal solved the problem.

If you have the same problem, you could start solving from here. Continue reading

Fixing a broken .htaccess for drupal

The Drupal site at tekipad.com broke its clean url functionality and every attempt to access similar to tekipad.com/node/33 began redirecting to tekipad/blog ‘s 404 error page. tekipad.com/?q=admin links worked fine though.
On accessing the root directory of the site via ftp and downloading .htaccess, the error seemed obvious. The following lines needed to be added.
As an introduction, the site is organized as follows:
/ is the root directory of tekipad.com which runs drupal
while the wordpress blog is installed at /blog

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

You may need to be careful of the following parts in the last two lines:
1) ^/(.*)$
if your site is to be accessed as a subdirectory of your site, the part has to be modified to ^/subdir/(.*)$
2) /index.php?q=$1
this has to be /subdir/in1dex.php?q=$1

Was a basic mistake but took a couple of hours to find and fix it. I was assuming the problem was in the drupal database.

Man Pages:

Drupal with Ubuntu – Simple Errors

Just installed Drupal a few hours ago. Had some minor hiccups, that took a couple of minutes to solve and thought I should document it.

1. On visiting localhost/drupal, it asks for languages. I selected English and in the next step, it was unable to find a working database configuration. Since I was using mysql, the solution was to install the following
sudo aptitude install php5-mysql
and restart apache2
sudo /etc/init.d/apache2 restart

2. Drupal installs but on the admin page complains about cron not working. A manual cron run fixed that. There is a button right under in the drupal warning, so that was simple.

3. Drupal compains on the admin page about gd library not being installed. I recollect that it was a graphics library of some kind, so off I go to aptitude again.
sudo aptitude install php5-gd
and restart apache. Everything hunky-dory. Back to playing with drupal.