Solved

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

Posted on 2004-08-17
4
241 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
  • 2
4 Comments
 
LVL 6

Assisted Solution

by:philjones85
philjones85 earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
hello Micro_Learner

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

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
LAMP problem identifier tool ? 9 100
Problem to go to page 12 66
Clearing cache in word press. 3 33
Setting up a WAMP server... 7 48
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now