By Mogh on
Sorry- I'm sure these kind of problems are old hat, a newbie here!
I'm test-deploying Drupal on a spare Windows XP machine under Apache 2.0, with PHP 5.04 and MySQL before I begin using it on a couple of web sites. Apache is installed fine, as is PHP. Apache is definitely serving webpages as if I stick a sample index.html in my document root, it appears on http://localhost/ . However, having followed the Drupal installation instructions to the letter, all I get when I view that page with everything installed is a directory listing of files. I see an index.php which upon clicking shows me code, as opposed to update.php which upon clicking shows me a page.
Any suggestions?
Best,
Chris
Comments
sounds
like an Apache config issue. I think you need to set php and index.php as DocType in the Apache config file.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mount
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Apache bug
Your .htaccess file is not read correctly (or not at all).
Options for solutions:
- See http://drupal.org/node/30221
- Make sure the following exists in your .htacces
# Set the default handler.
DirectoryIndex index.php
- Make sure index.php exists in your web directory and has the correct owner, group settings and has READ access.
Thanks
I’m new to Apache, PHP, MySQL and Drupal, but this weekend I installed it all.
All I got was directory listing ….
Checked everything for almost 20 hours……
And what had I done wrong?
Misspelled index.php in DirectoryIndex like this index.phb ……
Svein P
After reading through the thread
and seeing the suggestions you have received, I have one question: what happens when you navigate to http://www.yoursite.com/index.php
If this brings up your site, then the issue is in your httpd.conf, as sepeck said. You need to add index.php to the list of files in the DirectoryIndex setting.
The .htaccess file that ships with the standard Drupal install is configured to allow Drupal to run, and in most cases will not need any changes.
Hope this helps.
Cheers,
bonobo
-------
http://www.funnymonkey.com
Tools for Teachers
-------
http://www.funnymonkey.com
definitely a problem with
definitely a problem with apache settings
just go to the httpd.conf file find the part which looks like this
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None
Change it to AllowOverride All
Restart the Apache
It should work fine
Thanks guys for your many
Thanks guys for your many responses. Nice to see a thriving and welcoming community here :)
I'll be back at work on Monday and try making the alterations you suggest- I'll keep everyone informed!
I tried the solutions above-
I tried the solutions above- not having a lot of luck!
The following line is in my .htaccess file:
# Set the default handler
DirectoryIndex index.php
Permissions for the file are definitely set as free-for-all viewing.
The following is from my httpd.conf file:
# First, we configure the "default" to be a very restrictive set of
# features.
#
Options FollowSymLinks
AllowOverride All
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
# This should be changed to whatever you set DocumentRoot to.
#
...
AllowOverride All
...
And at the bottom of my httpd.conf file is this:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
Oddly enough update.php in the same directory loads up and shows a picture and formatted text so I'm assuming something is working somewhere... just no joy for index.php!
Any thoughts much appreciated
Chris :)
AllowOveride All
Which version of Apache, MySQL, PHP and OS are you using?
AllowOveride All
Which version of Apache (ie 2.x.x), MySQL, PHP and OS are you using?
httpd.conf settings
I had a look again at your response.
Firstly:
To ensure we create error logs do as I described in the following:
http://drupal.org/node/30177
Please post any errors found in the generated log file.
Secondly:
The following is an extract from a draft .htacces I am writing. I see you listed Options FollowSymLinks in your httpd.conf file. The line should ONLY be found in .htaccess. Please read below. Additionally set the
<Files>section to allow access for yourself. Currently it reads to deny all to your website. Let me know if this works for you.#----------------------------------------------------------------------------------------------
#
# $Id: .htaccess,v 1.66 2005/03/20 19:15:00 dries Exp $
# revised herman 2005/09/01
#
# Apache/PHP/Drupal settings:
#
# Be aware of the following:
# - This file only works on Apache server.
# - This file will only affect the directory and its substructure
# (ie sub-directories and files) where it is located.
# - You need to add a hard carriage return after the last character of the last line.
# (ie have a blank line at the bottom of the file)
#
# Before you start:
# Configure the httpd.conf file. This is the configuration file of Apache with a typical location path of:
#
# /my/path/to/apache/httpd.conf
#
# If you do not know the path, just type (the $ is the command prompt - DO NOT TYPE IT) at the prompt:
# $ locate httpd.conf
#
# Locate the
<Directory>section in your httpd.conf file. If you use virtual hosts each virtual host will (should!) have a<Directory>section.# Only change the specific virtual host's settings for which you want to grant use of the .htaccess file.
#
# Include ONLY the directive "AllowOverride" with parameters as below in the
<Directory>section#
# For example:
#
#
<Directory "/my/pathto/hosted/web_httpdocs"># AllowOverride Indexes Limit Options
#
</Directory>#
# NOTE: I have found that if you use Apache21 on FreeBSD the "All" parameter does not work correctly. Therefore rather use seperate parameters.
#
# ---------------------------------------------------------------------------------------------
# Protect files and directories from prying eyes.
# ---- Still needs to check why this does not work ---
#
<Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$"><Files *>Order deny,allow
# Deny access to all and everybody the web site
Deny from all
# Now give access only to trusted users by using ".xxx.xxx" format - NOTE: you must have a point "." BEFORE the "your_own_domain.xxx" part
# You can also use an IP address range such as xxx.xxx.xxx. eg 172.16.20. - NOTE: You must have a point "." AFTER the "xxx.xxx.xxx" part
Allow from .your_own_domain
</Files># Keep those knowing hackers away from your .htaccess file
<Files .htaccess>order allow,deny
deny from all
</Files>I have the same problem
Hi.
I am facing exactly the same problem on WindowsXP. Versions of the programs I'm using are:
PHP Version 5.0.5
Apache 2.0.54
drupal 4.6.3
PHP itself works fine (I got result of "phpinfo()"). Of course, I followed the installation procedure as explained in the Handbook.
Get XAMPP
To get Drupal working on Windows with no pain, use XAMPP.
Download and unzip the XAMPP directory tree. Run
setup_xampp.bat. Open a web browser on http://localhost and take it from there. PHP and MySQL will be all configured and ready to go.Optionally, to switch to PHP4 (which I recommend for Drupal over PHP5 because not all the modules work with PHP5 even if the Drupal core does): Run
php_switch.batto switch to PHP4, then edit apache\conf\httpd.conf and uncomment this line:LoadModule rewrite_module modules/mod_rewrite.so(mod_rewrite is already enabled for PHP5 under XAMPP.)
My Drupal started to work on WindowsXP!
Many thanks to Geary.
Following your advise, I installed XAMPP Lite 1.4.15 and my Drupal site started to work (not enough tested yet, though).
The configuration I had to make is only to remove default page data in "htdocs". I also think this is a simplest and fastest way, as you wrote, to install Drupal on WindowsXP.
Thanks again.
404 error with new Drupal installation
Goggie was spot on - Thanks!
I had the same problem on localhost using drupal-4.6.5 with Apache 2.0.52, and PHP5.0.3 on a windows XP machine.
Navigating to localhost/drupal-4.6.5/index.php brought up the Drupal opening page, but logging on produced a 404 error.
Double checked the base_url in settings.php, which was correct at localhost/drupal-4.6.5, but tried changing it to localhost/drupal-4.6.5/index.php. This enabled the site to work, but without any styling.
Changed base_url back to localhost/drupal-4.6.5 as it should have been.
As mentioned above, the .htaccess file is either wrong or not being recognised.
In my case, the problem went back to the settings of the server. I had to change .httpd.conf in my Apache settings to AllowOverride Indexes Limit Options Then restarted Apache.
Problem solved - Many thanks!
New Directories with XAMPP
I just installed XAMPP on my xp. Changed the php version. BUT, how do you get it to see other directories. Everytime I enter localhost the software automatically goes to XAMPP folder in htdocs. i.e. http://localhost/xampp/index.php
Everything works okay but I want to install Drupal in a separate folder under htdocs. Any clues?
stevek
XAMMP site
has the answer
http://www.apachefriends.org/en/xampp-windows.html#1170
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
PHP redirect
Thanks for your quick reply. After reading the help file things still didn't work properly. I then went and checked the "index.php" file and found that they have a redirect in the file. Once I changed the name of the file everything worked fine.
Again thanks,
stevek
Check Apache Log
In my case, PHP couldnt load php_mysql.dll..
Edit php.ini :
Enable mysql in the extensions and set the 'extensions_dir' preferably to a full path..
It could be anyother problem, but checking the Apache error log should give you a clue or two.
|
/|\
Dropping into index
I have been having the same problem dropping into the index instead of the Drupal page. I looked in my Apache httpd.conf file and noticed that the DirectoryIndex entry did not include "index.php" so it was not looking for that file when the browser was given the drupal directory. Changing this seems to have fixed the problem.