Solved

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

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
new line in php on linux server 6 190
Xampp Not Stopping 9 41
htaccess restrict subdomain 4 113
LINUX CENTOS + APACHE 9 68
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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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