473,626 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Installing php 5.x on apache 2.x

Can someone please help me install php on apache?

I downloaded the latest stable msi installer. Left it with default options
unless i specifically needed to change them (e.g. server). Then I went to
configue my httpd.conf file, and I realised I don't know where to put the
lines of code.

Can someone please say where I need to insert:

1) ScriptAlias /php/ "c:/php/"

2) AddType application/x-httpd-php .php3) Action application/x-httpd-php
"/php/php-cgi.exe"Thanks.
Nov 22 '05 #1
5 1756
On Sat, 19 Nov 2005 23:16:37 -0000, "Samuel" <sa****@fssc.fr eeserve.co.uk>
wrote:
Can someone please help me install php on apache?

I downloaded the latest stable msi installer. Left it with default options
unless i specifically needed to change them (e.g. server). Then I went to
configue my httpd.conf file, and I realised I don't know where to put the
lines of code.

Can someone please say where I need to insert:

1) ScriptAlias /php/ "c:/php/"

2) AddType application/x-httpd-php .php3) Action application/x-httpd-php
"/php/php-cgi.exe"Thanks.


"php3" indicates you may have got this information from a very old source, and
are you sure you want to be installing as CGI when installing as an Apache
module is available? Running as a module is typically faster, and a more
"normal" configuration - there's situations where CGI may be more appropriate
but they're not all that common.

http://www.php.net/manual/en/install.windows.manual.php
http://www.php.net/manual/en/install...ws.apache2.php

... have up to date information.

I would forget using the ".exe" PHP installer and always use the ".zip"
version, as this comes with a number of useful extension DLLs that the
installer doesn't.

The installer is also supposed to set up your webserver for you, IIRC; if it
hasn't actually done that, then the .zip version should be no harder to
install.
--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 22 '05 #2
I'm afraid you might have misread my post. the
1) ScriptAlias /php/ "c:/php/"

2) AddType application/x-httpd-php .php3) Action application/x-httpd-php
"/php/php-cgi.exe"Thanks.
was meant to read:

1) ScriptAlias /php/ "c:/php/"

2) AddType application/x-httpd-php .php
3) Action application/x-httpd-php
"/php/php-cgi.exe"
Thanks.

I looked at the .zip version and it seems more confusing than necessary.

I've had a look at the module code and I still don't know where to put the
lines.

To summerize:
1) I now want to know where to put these lines in the httpd.conf file:
i) LoadModule php5_module "c:/php/php5apache2.dll "
ii) AddType application/x-httpd-php .php
iii) PHPIniDir "C:/php"

2) I have decided against the .zip based on the fact it seems beyond my
ability.

3) I will now use the module code instead of the cgi code

4) I think I know where to put the first 2 lines of the module code, but I
still
don't know where to put the 3rd module code line.
Nov 22 '05 #3
Samuel wrote:
1) I now want to know where to put these lines in the httpd.conf file:
i) LoadModule php5_module "c:/php/php5apache2.dll "
ii) AddType application/x-httpd-php .php
iii) PHPIniDir "C:/php"


Doesn't matter. I like to keep them all right behind the list of other
LoadModule statements.

--
E. Dronkert
Nov 22 '05 #4

"Ewoud Dronkert" <fi*******@last name.net.invali d> wrote in message
news:ng******** *************** *********@4ax.c om...
Samuel wrote:
1) I now want to know where to put these lines in the httpd.conf file:
i) LoadModule php5_module "c:/php/php5apache2.dll "
ii) AddType application/x-httpd-php .php
iii) PHPIniDir "C:/php"


Doesn't matter. I like to keep them all right behind the list of other
LoadModule statements.

--
E. Dronkert


Hmmm... When I do that my Apache service won't start.
Any suggestions?
Nov 22 '05 #5
Samuel wrote:
Hmmm... When I do that my Apache service won't start.
Any suggestions?


What's the error message when you start 'Test configuration' from the
submenu 'Configure Apache server' in the start menu item from Apache?

Could be a configuration error in php.ini.

Btw, I really don't understand your 'the zipfile is beyond me' attitude.
What exactly is so difficult about 1) download zipfile 2) unzip to c:\php
3) rename php.ini-recommended to php.ini ..??! Certainly the things you
plan to do with apache/php will be a lot more difficult than that.

--
E. Dronkert
Nov 22 '05 #6

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

Similar topics

3
5495
by: Vik Rubenfeld | last post by:
I'm a newbie to Apache. This week I installed my first Apache 2.0 server, and it's working fine. I then installed PHP. When I ran the PHP test file ("test.php"), the actual text contents of the file came up in the browser: ---------------- <?php phpinfo(); ?> ----------------
1
1980
by: killu007 | last post by:
I use PHP on a windows xp machine and have problem installing PHP extensions. How can i install php extensions on windows xp. I use apache 2.x. I am particularly interested in installing php_domxml.dll.... Any help would be greatly appreciated....
3
4916
by: Jean-Christian Imbeault | last post by:
I have a user account on a RH Linux machine but no root access. I succesfully installed apache 1.3 under my /home/ account but can't get PHP to install properly. I have done the following steps: #1 compiled and installed apache using --prefix=/home/imbeauje/apache. Tested that it works.
2
2232
by: Bill McFarland | last post by:
Hi folks. I'm installing PHP 5 with Apache 2 as a module (also with MySQL embedded in php as an extension along with gd and tiny) on a Win2003 server. When I start Apache2 as a service without the php.ini in the C:\WINDOWS directory, Apache starts. PHP also functions (my test.php file (<? phpinfo(); ?>) produces the expected output), however, none of the three embedded modules is active (which is to be expected). When I add the...
1
2280
by: wolf | last post by:
i would like to briefly share my experiences with installing mod_python on a w2000 box. i must say that i believe the installation process to be unnecessarily complicated by the simple fact that the installer itself seems to be buggy -- in my case, no combination of mod_python 3.0.4, 3.1.2b and python 2.2.3, 2.3.3 ever came to completion. rather, the installer would exit -- after an initial declaration of having successfully found python...
1
1646
by: bissatch | last post by:
Hi, I have had to reinstall windows and at present I am currently trying to put back in place my apache2/php4 setup. I have installed apache and I get the http://localhost 'apache is installed' page. Nice one! When I try to configure apache with PHP unzipped into a folder (c:/php) and run it as a module, no matter what I try it just wont load the PHP
2
355
by: y_oda2002 | last post by:
Hi everyone, I was wondering if anyone could help me. I am trying to install php so that i can learn the code. So far i havent had any problems installing apache. However when i try to get mysql to run with apache and php the windows services gives an error upon starting apache. Something like error module not found. php_mysql.dll does not exist.
1
4281
by: zpinhead | last post by:
I am unable to get my downloaded extension from pecl to link up with php properly. seems like the php.so I could not use pear install http. pear claimed the extension was already installed. that is certainly not true. I downloaded the http extension from pecl. cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/http
0
1859
by: shivapadma | last post by:
apache server 2.2.9 is installed in my system as follows 1.while installing in the middle some settings were asked like Network Domain: localhost Server Name: localhost Admin Email: (i gave my email id) : for All Users, on Port 80, as a Service
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
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...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
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...
1
6122
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
5571
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
4090
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...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.