Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-17
4
Medium Priority
?
251 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 800 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 1200 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

876 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