SunQuest
 
           Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old March 18th, 2005, 09:38 AM
Doug_Gentry Doug_Gentry is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 3 Doug_Gentry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 13 sec
Reputation Power: 0
HTTPD Conf file issue

I'm reading the book "Sams teach yourself php, mysql and apache"

in setting up PHP I'm at the section where it says I need to add a few lines into my httpd conf file to let apache work with php.

First find the section that had

# Example:
#LoadModule foo_module modules/mod_foo.so

at the end of this section, add the following

LoadModule php4_module C:/php-version/sapi/php4appache2.dll


next look for this section.
#
#AddType allows you to add to or overide the MIME configuration

add the following lines.
AddType application/x-httpd-php .php .phtml .html

AddType application/x-httpd-php-source .phps

I then saved the file and restarted apache and apache fails to start again.

I did all this in the C:\Apache2\conf\httpd file
right below that file I see a httpd.default file also

anyway here's my httpd conf file, Does anyone see anything wrong that would keep apache from starting?


#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "C:/Apache2" will be interpreted by the
# server as "C:/Apache2/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "C:/Apache2"

#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
#ScoreBoardFile logs/apache_runtime_status

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile logs/httpd.pid

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#

Reply With Quote
  #2  
Old March 25th, 2005, 03:54 PM
devqual devqual is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Porto, Portugal
Posts: 33 devqual User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 19 m 41 sec
Reputation Power: 5
In which folder do you have the php installed?

I've installed php in folder c:/php/ on my computer and the lines to configure php in httpd.conf are as below

Code:
ScriptAlias /php/ "c:/php/"

AddType application/x-httpd-php .php .phtml

Action application/x-httpd-php "/php/php.exe" 


In think you are missing the path where php is installed.

Reply With Quote
  #3  
Old April 14th, 2005, 04:28 AM
march109 march109 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 7 march109 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 4 m 33 sec
Reputation Power: 0
I have just finished setting up PHP with Apache

I have just finished setting up PHP with Apache and initially had the same problem as you, it turns out that there are many sections in the config file that relate to php, if you want a copy of my httod file message me and I will send it to you, note I have only activated PHP support and it isn't suitable for a 'live' server. I can also comment all the areas where you may need to edit the file,

Ta

Reply With Quote
  #4  
Old April 22nd, 2005, 12:46 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
this is how you enable php support for apache, not the suggested idea you have.


LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php .phtml .php3 .php4
AddType application/x-httpd-php-source .phps


^^^^^^^^

add these lines under the Dynamic Shared Object (DSO) Support list.
__________________
Apache Expert

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > HTTPD Conf file issue


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway