Solved

Enabling PHP on Apache web server that is locally installed in my home directory

Posted on 2004-08-17
4
246 Views
Last Modified: 2010-03-04
Hello I am a novice when it comes to computers in general.With a great amt of help from this forumn I have been able to intstall Apache web server in my home directory ...

/home/bob/apache

This is working fine and I am able to test some CGI scripts and everything is working fine.

Now I need to install PHP(enable PHP) for my local httpd server.I tried to install it but could not ...as it is trying to install somethings where I dont have permissions.

My question is how do I install PHP locally and make it work..DO I have to specify or give a path wherein it checks only the local installation not the main server.

This is what I have tried so far ...

$ cd php-4.3
$./configure --with-apxs=/home/bob/apache/bin/apxs
$make
_________
Till here everething seem to work
$make install          ---This gives a no permission error

Thanks for your time....I appreciate it
0
Comment
Question by:micro_learner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Assisted Solution

by:philjones85
philjones85 earned 200 total points
ID: 11824813
add a prefix to your configure script

$./configure --prefix=/home/bob/apache/php
0
 
LVL 9

Accepted Solution

by:
ronan_40060 earned 300 total points
ID: 11826279
Hello Micro_learner

To enable php on apache
Open your httpd.conf file and look for the following lines:

LoadModule php4_module  
libexec/libphp4.so

The above line loads the module.  Then you also need to have a line to tell it to process the .php file.  The line for this is:

AddType application/x-httpd-php .php

There should be sections for each of these lines.  
The AddType line is usually present, but commented (#) out.

You can also add more extensions that you want to process as well, like .php .php3 .php4 etc.

After adding these lines you need to restart your apache server.  

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
About the question of File permissions
in Linux Environment
You can then change file permissions with chmod.
 All  files have three sets of permissions: owner, group, and other.  Each set corresponds to a different set of people:

Owner: the person who actually owns the file
Group: anyone in the same group as the owner
Other: everyone else.
To view the permissions and ownership of a file, use "ls -l".  This will show you three sets of permissions.  'r' means read, 'x' means eXecute, and 'w' means write.  the three sets correspond to owner, group and other.


So in order to  allow the current owner to execute a file, you must do:

chmod u+x filename

You can change file ownership using "chown".

 When you are the  root user, then you have the  ability to change all permissions and ownership.  Other users can only operate on files for which they have appropriate permissions  and ownership.

I hope it helps
Good Luck
Ronan
0
 

Author Comment

by:micro_learner
ID: 11826319
Hey ronan ..one quick question ..does this mean that I need not install PHP ...or is this after u install it..
Thanks so much
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 11826649
hello Micro_Learner

yes do what i mentioned after you install php
good Luck
Ronan
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question