Solved

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

Posted on 2004-08-17
4
248 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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

632 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