I've used Drupal for a couple of months to keep a site updated and have just taken the next step of building my own setup to do a little development. The machine is a MacBook Pro but I run VMWare Fusion and the Drupal build is on an Ubuntu (Lucid) VM. So:
- I followed the instructions at http://www.drupal.com/node/326964 and picked up the packages.
- I ran gksudo gedit /etc/apache2/sites-available/default
(an observation: there is an error. Drupal installs into /usr/share/drupal6, not /usr/share/drupal)
- I edited the file:
desktop:~$ head -15 /etc/apache2/sites-available/default
ServerAdmin webmaster@localhost
DocumentRoot /usr/share/drupal6
Options FollowSymLinks
AllowOverride All
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
- I enabled rewrite.
- I checked the PHP memory limit, which was already at 128 M
- I then tried to restart Apache, which is where I think my problems start:
desktop:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting .apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
- and when I go to http://localhost/drupal/install.php, this is what I get:
"Site off-line. The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running."
There is no settings.php file in /usr/share/drupal6. Nor, in spite of what people say, is there an install.txt file in there.
Advice would be gratefully received: bear in mind I have never run a web server, so comments like "dumb noob" are permitted, if not welcomed...
Comments
Sites directory and documentroot
It seems to me that your documentroot is pointing to /usr/share/drupal6 is that where you placed Drupal files or are they in /etc/apache2/
All in all, since the install URL is loading Drupal, you are almost home... make sure that in the install directory, there is a directory called /sites, there is a sub-directory called "default", and that there is a file called "settings.php" If not, at least create the directories and let setup create the settings file (it may ask you to go and place the settings-default.php file in there).
Please provide info on your directory structure under /sites
Ah, that's helpful. Directory
Ah, that's helpful. Directory looks like this:
desktop:/usr/share/drupal6$ ls -al
total 128
drwxr-xr-x 7 root root 4096 2011-01-04 20:48 .
drwxr-xr-x 318 root root 12288 2011-01-04 20:48 ..
-rw-r--r-- 1 root root 262 2006-08-09 08:42 cron.php
lrwxrwxrwx 1 root root 22 2011-01-04 20:48 .htaccess -> /etc/drupal/6/htaccess
drwxr-xr-x 2 root root 4096 2011-01-04 20:48 includes
-rw-r--r-- 1 root root 980 2007-12-26 08:46 index.php
-rw-r--r-- 1 root root 47149 2010-03-01 09:36 install.php
drwxr-xr-x 3 root root 4096 2011-01-04 20:48 misc
drwxr-xr-x 35 root root 4096 2011-01-04 20:48 modules
lrwxrwxrwx 1 root root 22 2011-01-04 20:48 profiles -> /etc/drupal/6/profiles
-rw-r--r-- 1 root root 1590 2008-12-10 20:12 robots.txt
drwxr-xr-x 2 root root 4096 2011-01-04 20:48 scripts
lrwxrwxrwx 1 root root 19 2011-01-04 20:48 sites -> /etc/drupal/6/sites
drwxr-xr-x 7 root root 4096 2011-01-04 20:48 themes
-rw-r--r-- 1 root root 25457 2009-03-30 12:15 update.php
-rw-r--r-- 1 root root 352 2005-12-10 19:26 xmlrpc.php
If I cd to sites, there is indeed a subdirectory called default and a file called settings.php. So having found the file... what's the next step?
Thanks,
Mac
Isolate, more info & trials
OK, let's step back and do a test to really isolate the problem -
create a file in the drupal installation directory (e.g info.php) and in it call the function to give PHP config info
phpinfo();Call the file in the browser and it should spit out all the details about the PHP configuration of your server. There should be a section about mysql (normally if PHP cannot see the DBMS, all else if futile). Also look at the other settings to make sure that PHP is well configured to run Drupal - you can fine details requirements at http://drupal.org/requirements
If/once we are sure that the server part is fine, I would suggest the following:
Download a very fresh copy of Drupal, place it in the install directory, and visit the url to see if it installs properly. using symbolic links to refer to htacess and /sites should work ok (your current setup), but suggest that we try a test install with a typical/out-of-the-box set
Sorry for long delay
OK, to update this:
- created info.php in the /usr/share/drupal6 directory - and it runs correctly. PHP version is 5.3.2-1ubuntu4.7
- mysql is present, as is mysqli.
- as far as I can see, all requirements stated at the URL are met. Will try the out-of-box install, but bear in mind that this is effectively out-of-box because I've not managed to get it started yet!
Mac
And a further update or two
I've (I think) resolved a couple of problems:
The Apache server was apparently not running correctly - I traced the error to not having a hostname entry - so I added a hostname to the apache2.conf file. I also found the server wouldn't listen on port 80 because the Ubuntu system clock is hogging the port - so I added a line to get apache2conf to listen on port 81.
I've also ensured I have a running copy of mysql and that the password works (well, at least it does for user root, but then everything on the install seems to be owned by root)
And I try again with
http://localhost:81/drupal/install.php
which gives me a 404 error; while
http://localhost/drupal/install.php
gives me the same error screen as I got at stage one. Replacing localhost with 127.0.0.1 gives the same errors.
Mac
How to be a dumb n00b, part 94
http://localhost/drupal/install.php doesn't work.
But the right URL, which is http://localhost/drupal6/install.php, gets me onto Drupal fine. All I need now is to sort the database access out and I think I can go from there.
Heigh-ho...
Mac