473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1745
On Sat, 19 Nov 2005 23:16:37 -0000, "Samuel" <sa****@fssc.freeserve.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.uk :: 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*******@lastname.net.invalid> wrote in message
news:ng********************************@4ax.com...
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
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...
1
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...
3
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...
2
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...
1
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...
1
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...
2
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...
1
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....
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.