I try to get a test Drupal website running locally under Windows98, Apache 1.3.29, PHP 4.3.4 and MySQL 4.0.17

I am sure that I am almost there, but I feel that I need some help now. I include the key details on my installation below.

Erik Wesselius
Utrecht, Nederland

--------

I followed step 1,2 and 3 from the install file. Everything works fine. I can access the drupal SQL database through PhpMyAdmin, but I get stuck at INSTALLATION STEP 4: CONNECTING DRUPAL.

Here are the details:

The MySQL database for the drupal test site resides at
C:\Program Files\MySQL\data\drupal

My Apache httpd.conf file defines the server DocumentRoot as
C:\phpWeb

I unzipped and untarred Drupal 4.3.2 into the directory
C:\phpWeb\drupal

In the Drupal conf.php file I edited the following lines:

$db_url = "mysql://erik:password@localhost/drupal";

(where 'password' stands for the password defined for the MySQL drupal database)

$base_url = "http://localhost/drupal";

But when I point my browser to http://localhost/drupal/index.php,
I get an empty Drupal page with the text

Access denied
You are not authorized to access this page.

If I try to login with my SQL password I get an error 403 page in return:

Not Found
The requested URL /drupal/ was not found on this server.

Apache/1.3.29 Server at localhost Port 80

The URL in the addressbox of the navigation toolbar of my browser says
http://localhost/drupal/?q=user/login

Comments

Lappie’s picture

So your actually failing step 5! (to nitpick a little :))

However, step 5 tells you to create your 'root'/admin account (account #1) for drupal administration by clicking the 'create new account' link.

After that, all should go well since you don't get any other errors that might indicate a faulty install. Note there are different passwords going on here: one for your MySQL access (you only have to enter that one once in conf.php) and one, you have to create, for the administrator account of Drupal.

HTH

erikwesselius’s picture

Thanks for your suggestion, but unfortunately it doesn't help.

If I click on the button "Create new account" I get an error 403 again...

So it must be something else. But what?

Erik

Lappie’s picture

Apologies, I didn't get that from your initial posting.

I've never worked with apache+php on Windows, so I'm unable to help but for a couple of minor things: are you sure localhost resolves to 127.0.0.1? If you change the index.php of Drupal with a regular webpage, does that work? What if you try with '?q=user/register' instead of 'q=user/login'? What happens if you change the content of index.php to ' phpinfo(); ' (no quotes of course)? Are the read-permissions set correctly (i.e., is apache allowed to read the directory and files with /drupal)?

Ernest-1’s picture

This sounds more like a straight-forward permissions error. I'm using Linux so I can't test your symptoms but it looks to me like your server does not have access privileges to your drupal directory.

On Linux, the default web server User is wwwrun. My Drupal directory permissions are set to this:

User is wwwrun, with Read and Execute permissions (no write)

Group is a group that I created for myself only, and it has Read/Write/Execut permissions.

Others is left blank with no permissions.

I'm not sure what User Apache uses on Windows but you can find out by looking in the httpd.conf file. Look for the User and Group lines.

Make sure that your drupal directory is set to allow your Apache server to act as the User.

Note: There are some files and directories that WILL need Write permissions enabled for the Apache User account, but for security reasons, you should avoid giving the Apache server User account Write permissions to all files and directories on the Druapl site. The directories /includes and /images are obvious examples of directories that Apache will need to write to.

Try that, and let us know if it helps. You might also try rebooting your system after you make the changes. Sometimes that helps.

Ernest-1’s picture

You'll also want to make sure that all of the files and directories within your main Drupal directory have their permissions set to allow the Apache server to Read and Execute, as well as Write whenever appropriate. Basically, you want the Apache server User account to have ownership of the Drupal directory, and all of it's contents.

Note: This does not apply to the fsupdate.php file, which you only allow Apache access to one time.

Ernest-1’s picture

I do not have a Domain name yet, so I am currently using my IP address as my base URL. My conf.php file looks like this:

$db_url = "mysql://databaseuser:databasepassword@localhost/drupal"
$base_url = "http://12.229.215.130"

My httpd.conf file directory settigns look like this:

DocumentRoot "/srv/www/htdocs/drupal"
Directory "/srv/www/htdocs/drupal"

So, what this means is that the Apache server already knows what the site root directory is for my IP address. If you type my IP address on your browser, Apache takes you to my Drupal directory.

Conf.php uses my IP address as it's Base_url, which is where index.php is. Conf.php uses whatever Apache thinks is the root directory. In my case, since Apache thinks that the site root is my drupal directory, my IP address is what I should use as the conf.php base_url address.

Does that make sense?

So in your case, if Apache thinks that C:\phpWeb is your site directory, then you would use http://x.x.x.x (IP address) as your base_url, rather than localhost/drupal, because any external browser is going to use your IP address rather than http://localost when they visit your site.

Later, if you buy a domain name, you can plug your fully qualified domain name (erik.domain.com) in where your IP address is now.

erikwesselius’s picture

Ernest,

Thanks for your extensive reply. Unfortunately, it still doesn't work.

I have tried all kind of combinations, fiddled with the Apache httpd.conf file and tweaked the drupal conf.php file, but I still get the same errors. I am sure that it is something in drupal: the phpMyAdmin interface works fine, so why the hell drupal is not working?

I am going to ask again in the forum. Maybe somebody else succeeded in getting a similar configuration going...

And I heartily agree with your comment that Drupal setup documentation needs work!!!

matt westgate’s picture

Do you get a 403 error when you go to http://localhost/drupal/index.php?q=user/register

What do your apache log files say?

erikwesselius’s picture

Thanks!

These settings work for me:

in php.ini
doc_root = "c:\phpWeb\drupal"

in apache httpd.conf
DocumentRoot "C:/phpWeb/drupal"
<Directory "C:/phpWeb/drupal">

in drupal conf.php
$base_url = "http://localhost"

Erik

Ernest-1’s picture

Congrats! It's fun to get these things sorted out.

Taran’s picture

I *do* get the 403 error at that link. To top it off, I have a 500 somewhere.

I'm checking my permissions now. I installed everything as root, so nothing seemed to have the right permissions to execute.

Is there a list of required CHMODs for Drupal files? I suspect that may be the issue.

Of course, I'm probably missing the obvious right now. And I'll get to that magic patch next.

Taran’s picture

doc_root needed some help. Alas, 1and1.com didn't have a PHP.ini file installed already, so - I tracked down a secure one I had lieing around and modded it appropriately.

Now the fun begins.