Will installing apache for PHP and Tomcat give problems?
Moderator: General Moderators
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
Will installing apache for PHP and Tomcat give problems?
I already have Tomcat running in my local system for JSP and I am thinking of installing Apache for running PHP. Will it pose any problems if two apaches are running on the same machine? I do not have a great deal of knowledge with Web Servers so do explain me as if I were a novice.
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I have let the Tomcat run in 8080 instead of changing it to 80 so I hope when installing Apache it should automatically run from 80.
I downloaded the zip file from the following description...
I do not see a installation file in the zip file I downloaded. How do I install it or is it possible to manually start the server without configuring it?
I downloaded the zip file from the following description...
Code: Select all
Win32 Source: httpd-2.0.55-win32-src.zip [PGP] [MD5]- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Compiling leads to faster performance since the application was built on your CPUraghavan20 wrote:You are right and I am not into the compiling stuff. But why in the World one would want to compile if direct installation file is available?
I have tried to install apache in my local machine....What values should I supply for network domain and server name?
We cannot possibly answer that last question for you, I assume you not wanting to use localhost or you wouldn;t have asked? You should know those details.
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
1. I am trying to install PHP 4.4.2. There are two files available, one is a zip file and the other is a installation file.
I have downloaded the installation file and installed it. The apache tutorial says to alter httpd.conf file, it wants me to add a new line
There is no sapi folder in the installation package.
2. Where should I put my php files so that apache recognizes it?
I have downloaded the installation file and installed it. The apache tutorial says to alter httpd.conf file, it wants me to add a new line
Code: Select all
LoadModule php4_module c:/php-version/sapi/php4apache2.dll2. Where should I put my php files so that apache recognizes it?
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I have now downloaded php4.4.2 zip package and extracted to j:
I found the sapi folder inside this installation directory.
I have added the line for loading the module from the sapi directory but the apache reports that module cannot be found in that path....
I see now that I have to put php files under htdocs folder but I already I see a lot of files in there. In apache, is it not possible to put the files outside and refer to it. Anyway, I created a test folder and put a new php file into it. But when I try to run it, the file gets downloaded instead of running, I think this is because of the failure to run the module...
I found the sapi folder inside this installation directory.
I have added the line for loading the module from the sapi directory but the apache reports that module cannot be found in that path....
Code: Select all
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule php4_module j:/php-4.4.2/sapi/php4apache2.dll
Reported error by apache:
Syntax error on line 193 of j:/apache/apache/conf/httpd.conf:
Cannot load j:/php-4.4.2/sapi/php4apache2.dll into server: (126) The specified m
odule could not be found:
Note the errors or messages above, and press the <ESC> key to exit. 28...
This is the path returned by windows for php4apache2.dll
J:\php-4.4.2\sapi- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
As you said, paths are not absolute for directories within the apache package. But the dll file from sapi directory in PHP package has to be referenced as absolute. This was not the problem earlier but the book did not tell me to add module which I learnt from PHP.net and now all my php files run properly.
Code: Select all
LoadModule php4_module j:/php-4.4.2/sapi/php4apache.dll
AddModule mod_php4.c