Home Linux Community Forums Software Installation Apache/php installation

Apache/php installation

Link to this post 17 Jun 10

Hi, thanks for taking time.

I've installed apache on Ubuntu 10.04 LTS. Primary configuration is ok and I can view localhost in firefox, but:

I don't have permission to my NTFS drive where my .php webfiles reside, therefore I get "403 Forbidden" for my /media/T0/ folder, but there's no problem with my home folder, for example.

On the other hand, I'm facing a problem in compiling php, where "sudo ./configure" tells me that I don't have libxml2 on my system, while it's source is there in the php source folder, under ext/libxml directory.

Would appreciate your helps folks, thanks so much!

Link to this post 17 Jun 10

Re: Apache/NTFS
It sounds like a file rights issue.
What values are in the User, Group and DocumentRoot values in your httpd.conf file? Also what are the rights of the files and directories that you wish to have available to apache?

Generally the files within one package source code that refer to a dependent application are the code file meant to make the connection between the applications, not the source code for the actual dependent application. You have to have the compile libxml2 libraries installed on your system to fully compile php.

Link to this post 22 Jun 10

for libxml2, check to make sure you have both packacges libxml2 and libxml2-dev installed.

For the NTFS permissions issue, check that the www-data user has read and execute access to the files and folders.

Link to this post 23 Jun 10

thanks but I also need to ask these: first: How should I check and change the permissions ? (I'm a windows user, new to linux)

and how is the process of installing php on apache if you happen to know? The instructions in php documentation are a little ambiguous for me.

and if possible, tell me about linux directory structure. I use Ubuntu 10.04 LTS Desktop. I don't know which directory is for what, and how can I handle with directories that I don't have access/write permission for.

Link to this post 23 Jun 10

Woooo!!! you need to learn from scratch man. Grab a book and start reading.

Link to this post 24 Jun 10

Well, first, see who apache is running as. "ps auxw | egrep 'apache|http'"
Then do ls -ld and ls -l on the directory where the files are.

Do you understand Linux / Unix file permissions? The "-rw-r--r-- " stuff at the beginning of a directory listing from an ls -l? If not, then I suggest reading:

For installing php ... well, if you use the package repository, it's fairly easy. Just use synaptic, or aptitude, or apt-get, etc.
If you install the following package, all the needed dependencies should get you where you need to be: libapache2-mod-php5
If you want to install PHP and Apache from scratch, then you are going to have to do some reading. The INSTALL and README files for both apache and mod-php are not too bad. Essentially, you will need to build and install PHP. Then you will need to build Apache, but you will need to tell the apache install scripts to also build and install mod-php. Then you should be ok to go.

If you want to know about the directory layout, then thes following 2 links are good to read:

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board