473,837 Members | 1,559 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get PHP to work with Apache for Win32

Hi!
I have the Abyss webserver installed on my Windows 2000 workstation,
and it works OK with PHP (v4.3.7). Since I also have a Linux server at
an other location, I wanted to have similiar web server setup at home,
so I tried to install Apache webserver for Win32 (v1.3.33), but can't
get it to work with PHP. My PHP.INI has the,

; Enable the PHP scripting language engine under Apache.
engine = On

There's nothing about PHP inside the httpd.conf file. Have I missed
something here?

I would appreciate any comments on this.

TIA
Jul 17 '05 #1
2 2277
You need to load the php module in httpd.conf by adding these 3 lines
(change C:/PHP4_Installati onDir/ to reflect your installation):

LoadModule php4_module C:/PHP4_Installati onDir/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

Dae
Hi!
I have the Abyss webserver installed on my Windows 2000 workstation,
and it works OK with PHP (v4.3.7). Since I also have a Linux server at
an other location, I wanted to have similiar web server setup at home,
so I tried to install Apache webserver for Win32 (v1.3.33), but can't
get it to work with PHP. My PHP.INI has the,

; Enable the PHP scripting language engine under Apache.
engine = On

There's nothing about PHP inside the httpd.conf file. Have I missed
something here?

I would appreciate any comments on this.

TIA

Jul 17 '05 #2
Carved in mystic runes upon the very living rock, the last words of
Daedalus of comp.lang.php make plain:
I tried to install Apache webserver for Win32 (v1.3.33), but can't
get it to work with PHP. My PHP.INI has the,

; Enable the PHP scripting language engine under Apache.
engine = On

There's nothing about PHP inside the httpd.conf file. Have I missed
something here?

You need to load the php module in httpd.conf by adding these 3 lines
(change C:/PHP4_Installati onDir/ to reflect your installation):

LoadModule php4_module C:/PHP4_Installati onDir/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php


Cool, I didn't know you could run PHP as an Apache module under Windohs.

If you want or need to run it as a CGI instead, include this in your conf
file:

AddType application/x-httpd-php php
Action application/x-httpd-php /bin/php4/php.exe

(With the appropriate path to your binary, of course)

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1877
by: synergz | last post by:
I have 2 parallel systems for php development Debian linux with apache and PHP4 and Windows XP professional with apache & PHP4 I have been in the habit of debugging on the xp machine before I upload to the debian server If I run this example , it works fine on the linux web server _________________________________
0
1489
by: lewi | last post by:
I am using the win32 versions of Apache 1.3.24 and PHP 4.2.1 on Win2k Pro... Now I have Apache all setup and install PHP to use the php4apache.dll to use PHP as a sapi module and I am php.ini-dist as the php-ini I add the next few line to apache's httpd.conf file... LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
5
2815
by: DrWizard | last post by:
Hi I been first times setup. So Who have experience the Win98 + Apache + php (not run PWS or IIS) I begin download and installed the Apache. I test the run is working on browser (http://localhost) show the apache page. But Apache Console Running under the DOS Window say :- =====================================
1
2873
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on "http://www.modpython.org/live/current/doc-html/inst-testing.html". I've added specific information such as Windows filepaths and filenames so there's no ambiguity on what you should do. I encourage you to copy and paste to avoid typing errors. Cheers, Rolfe
6
3262
by: Piet | last post by:
Hi there, I cannot install mod_python v3.1.3 on either Win2k/ActivePython 2.3.2 or WinMe/Python 2.3.4. When I run the Windows installer, I get the following error message: Traceback (most recent call last): File "C:\Programme\Python23\Scripts\win32_postinstall.py", line 86, in ? apachediroptions = getApacheDirOptions() File "C:\Programme\Python23\Scripts\win32_postinstall.py", line 45, in getApacheDirOptions
7
2218
by: Steevo | last post by:
I am hoping to run a small website from a server in my house. Many people have suggested I use Apache web server and pointed me to: http://www.apache.org/dist/httpd/binaries/win32/ to download the installer. There are so many different files here I am totally unsure which one(s) I need in order to host my website. All help would be appreciated
3
1666
by: SMH | last post by:
Template Document Processor: PHP 5.1.6 Server: Apache httpd 2.0.55 (Win32) Database Server: MySQL 5.0.26-community for Win32 Operating System: Windows XP Pro SP2 ======= I just installed PHP and MySQL on my laptop for development purposes. The following directives are set in php.ini (Windows config file):
11
26656
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
2
3754
by: AlterEgo | last post by:
Hi all PHP newbie here, 1) I disabled IIS. 2) Loaded Apache 2.2.4 on Win2K3. 3) Loaded PHP 5.2.4 pretty much bare bones, but included MySQL, SMTP, SOAP and ZIP extensions. Installers: apache_2.2.4-win32-x86-openssl-0.9.8d.msi php-5.2.4-win32-installer.msi
0
9835
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10870
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10562
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10265
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5667
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3122
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.