Glad you could stop by the Linux Basement site. Linux Basement is an informational Podcast about Linux, open source software and lots of other wonderful technology. If you want to find out more about open source technologies, subscribe and have a listen!

#linuxbasement is up at irc.freenode.net

MP3 Feed
Ogg Vorbis Feed
MP3 Feed (all episodes)
Ogg Feed (all episodes)

Video blog (not the show!)

 

LAMPshade Drop

Hi, I'm trying to jump right in and swim around the webserver pool and follow your Drupal tutorials. I got through the LAMP setup, but have not been able to get the Drupal configuration page to appear. 
 
I'm using Zenwalk, a Slackware based distribution. They have their own packaging manager which I used to download and install Apache, mySQL, and PHP (with phpmyadmin). The LAMP configuration seemed to work, however, once I began the Installing Drupal tutorial, I started to get a bit lost. You start off talking about /var/www directory and how we should remove the apache2-default/ folder to obtain an empty www folder. This doesn't seem to correspond to what I'm seeing in my var/www. It looks like there are quite a few important files in there. Did Apache change the structure of this folder from version 2.0 to 2.2? I looked at the documentation and it just says that the configuration layout has been "simplified and modularized". It looks perhaps like the root document folder was changed from /var/www to /var/www/htdocs? Still, there are some graphics in there (and the phpmyadmin folder I guess I added at some point) besides the default index.html file.
 
Anyway, I made a couple of attempts to guess how to structure the Drupal setup and followed along with the tutorial. I set up the PHP account and database for Drupal but could not get the Drupal Database configuration screen to appear. I've grown quite dizzy with backup copies and restores and can no longer recall what was added and modified in the www folder at the various steps of installation (my free time has been sparse the last few weeks). The original file structure and my modifications at various stages have become blurred and I don't think I can move back to a fresh state without an entire re-install. Any suggestions on how to recover this install and move forward with Drupal? Any chance on updating the tutorials to work with Apache 2.2, or is there another reason the var/www folder structure is different for me?

Ok, just composing that last

Ok, just composing that last post clarified a few thing for myself. By putting all the drupal files in /var/www/htdocs I was able to make //localhost show a Drupal page, but it says "Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports." I went back and erased my drupal accounts in phpMyAdmin and recreated the user and db with no luck.
 
The package manager reports that I have mysql installed - any idea about where relatively Drupal is looking for evidence that mysql exists?

Not in my root!

I've had LAMP running on my Linux box for a few years, and didn't want to be scrapping what I had in /var/www, so I just added /var/www/drupal. That can be easily accessed with http://www.myURL.net/drupal/ for testing. Your htdocs is the same solution. I had no trouble accessing MySQL, although, I set it up directly through MySQL Administrator. Did you look in there to see that everything was created properly?
 
Peter
 
PeteTheGeek
# 25 years of messing about with computers #

Ok Don, I think I see where

Ok Don, I think I see where the problem is. First, we are both running the same version of Apache, so you don't have to worry about that. The only reason you have a different default directory is because you are running slackware, and I'm running Debian. I am not familiar with slackware at all, but I will try to do my best to help. I believe you are not getting database connectivity because apache is not acknowledging that you have mysql installed. First things first, restart apache2 and see if your problem fixes itself.
If that does not fix the problem, is it possible for you to re-install the packages, specifically apache and php? Something did not connect between php and mysql. one thing you may want to try, is adding the line extension=mysql.so to your php.ini file. My php.ini files is located at /etc/php5/apache2/php.ini
Let me know if that helps. We'll get you there.

I uncommented the extension

I uncommented the extension line already with no immediate effect. I'll try a reboot when I get home tonight. If I re-install, should I erase any additional folders and files manually? I assume I'll have to redo all the phpMyAdmin and Drupal install/configure steps again...

yeah, don't do the uninstall

yeah, don't do the uninstall just yet... you should just be able to restart the service, though I am unfamiliar how that works in slackware... in debian it is /etc/init.d/apache2 restart
Because you made a change to the php.ini file you will need to restart this service before it takes affect.

Ok, it looks like the

Ok, it looks like the slack/zen equivalent is etc/rc.d/rc.httpd. This file shows:
 
#!/bin/sh
#
# /etc/rc.d/rc.httpd
# Start/stop/restart the Apache web server.
#
# To make Apache start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.httpd
#

case "$1" in
   'start')
      /usr/sbin/apachectl start ;;
   'stop')
      /usr/sbin/apachectl stop ;;
   'restart')
      /usr/sbin/apachectl restart ;;
   *)
      echo "usage $0 start|stop|restart" ;;
esac
 
So I just need to type /etc/rc.d/rc.httpd restart ? Or would it have to do with that sbin location?
 
I'm currently looking over some old LAMP posts from the Zenwalk forums I finally found, but they're about 2 years old...

Did the restart command, no

Did the restart command, no dice. Found another config line to change (AllowOveride), didn't fix the problem. The main Drupal php index still doesn't recognize mysql's presence. Time for the reinstall?

Let me thnk about this...

Let me thnk about this... because if phpmyadmin is working, then drupal should work also...

I'm having a real hard time

I'm having a real hard time wrapping my head around the problem, because it acts like drupal can't see the database, but since phpmyadmin can, things should be working right. I guess a reinstall would be a good next move.

Found the character in the data stack

It turns out one of the steps I needed to set up LAMP was trickier that I was told. /etc/apache/php.ini in my package requires uncommenting of a line for php to configure mysql as a module. I had the line uncommented, but the line was "   extension=msql.so" by default so I had to add the 'y' in there also. I've been able to finish up the install now. I don't know what the msql package is for, but given the popularity of mysql in Linux I can't imagine why the default is set up like this.
 
Do Debian-based distros not require modification of this file to use dynamic extensions automatically?

Glad you got it figured out

Glad you got it figured out man! Thanks for letting us know how you did it. The debian packages do make the change for you, so when You install mysql it will mod the php.ini file for you. However, I've seen installs where this did not happen and had to manually make the change like you did. Hope you enjoy your working install now. Let me know if you have further problems.
Chad

Well, that didn't take long.

Well, that didn't take long. ;-) I don't seem to have "a2enmod" on my system. Any idea on another way to enabel Apache modules or what I would do to add the command?

I'm not familiar with

I'm not familiar with slackware at all. I did a couple google searches and came up with having to run ./configure with -enable-module-rewrite
Reference here:
http://www.kelv.net/programming/slackware.php

I've been looking at that

I've been looking at that page and other references to ./configure. Is this supposed to be a script in the root directory of every distro, or am I supposed to write a script myself? I don't see a ./configure file anywhere at present and the command line doesn't recognize it either. I'm trying to understand the Apache page on this, but I don't understand Linux toolchains and configuration enough to know where to look for handholds on this. I don't think my question at Zenwalk support was very coherent either.
 
I'm thinking I'll be starting the server over from the gound up with Debian...

Yeah unfortunetly the vast

Yeah unfortunetly the vast majority of my experience lies with Debian and Fedora, so I am not of much help. My tutorials should help specifically with Debian and Ubuntu though.

After a few days of playing

After a few days of playing with Ubuntu and Debian installs enough to remind me why I've settled on Zenwalk, at Tom Chaudoir's suggestion I simply went into the Drupal admin and changed the clean URL radio button. Lo and behold, it worked. Last week when I was flailing about looking for answers I edited a textfile to allowoverride = yes after a suggestion at the Drupal site, I just never tested it out with a restart. I'm not quite sure why I was able to do this without any sort of module enabling, perhaps the ZW crew took care of this in the apache package? Are you sure Debian/Ubuntu require that step?
 
I'm very happy with how your tutorials are organized, even though they are Debian specific. You have been concise and direct, while explaining the context of the steps enough that I've been able to track down how the specifics apply to my distro. I end up with a better understanding of how the OS functions, which is a primary reason I switched from Windows to Linux.

yeah sorry I am so Debian

yeah sorry I am so Debian specific, but it is what I use in a production environment so I have to focus on it. I'm glad you are still getting things out of the tutorial though, and appreciate you giving it such a good shot! To my knowledge, debian/ubuntu always required the urlrewrite module before clean urls works, but maybe things have changed.
Keep on hackin!
Chad