Welcome to the Linux Foundation Forum!
Apache/php installation
ActiveX
Posts: 59
in Installation
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!
0
Comments
-
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?
Re: PHP
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.0 -
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.0 -
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.0 -
Woooo!!! you need to learn from scratch man. Grab a book and start reading.0
-
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:
http://www.dartmouth.edu/~rc/help/faq/permissions.html
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:
http://tldp.org/LDP/intro-linux/html/sect_03_01.html
and
http://www.pathname.com/fhs/0 -
(Of course! However, I also consider my extremely fast learning ability and will start soon!)0
-
I'm compiling all of the packages from scratch, I download packages from their websites. I use Synaptic for applications such as games etc.
I seem to have found the problem. I need to recompile apache with --enable-so and then add php support to it.
I have another question: I download packages from their sites. There are lots of C/C++ files in different directories there, besides makefile, configure & etc. Ain't those file sources of softwares? while many sources I find in "modules" directory in all of those packages seem to be the source code for the softwares. is it so?0 -
ActiveX wrote:I have another question: I download packages from their sites. There are lots of C/C++ files in different directories there, besides makefile, configure & etc. Ain't those file sources of softwares? while many sources I find in "modules" directory in all of those packages seem to be the source code for the softwares. is it so?
I do not understand you.
C/C++ files are usually software code, yes. What's the question?0 -
Marc, check this (Re PHP Part):
mfillpot wrote: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?
Re: PHP
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.
Maybe mfillpot is saying something that I don't understand, but what I get from his reply is that the files inside a package can not necessarily be the source code of the program. But I find .cpp files that seem to belong to the package, as of in "/ext" or "/main" directories under php package. Ain't those files the source codes of php?
I think mfillpot has probably misunderstood my question. :huh:0 -
Well, he is saying that those .cpp files may not be from your applications itself but for something else (modules needed, another program to communicate with another one... dunno!)
Regards0 -
Marc got the summary of my response and simplified it pretty well.
The .cpp files that you see listed under the dependent application name are very likely modules meant to communicate between the applications and not the source for the dependent application.0 -
ok, so what happens if I wanna have the source code for an open source software?
You mean the file in "http://httpd.apache.org/download.cgi" called Unix source is not the source code of Apache web server, don't you?
So where is Apache's source? Where can I download it?0 -
You don't seems to really understand what the word dependent means. I will try not to refer to anything else that may confuse you.
I say that we need to start fresh on your issues with building and installing Apache so we can track your potential errors.
The source code you downloaded from apache.org is the source code for the project, once it is downloaded you only need to follow the instructions at http://httpd.apache.org/docs/2.2/install.html to compile and install the application with the default options. However if you want to customize the build then you will want to read about the optional configure flags at http://httpd.apache.org/docs/2.2/programs/configure.html#installationdirectories and apply them to your build process.
I would like appreciate if you would post your build script or if you are doing all of the entry line by line into the terminal then post your ./configure command so we can review what you are trying to configure into the build. I highly recommend using a build script so modifications can be tracked and commented for later use or revisions.0 -
ok, I seem to have found the problem, now I need your helps again, guys! Thanks
I need to remove my current installation, but all the truth is what you see below:activex@activex-desktop:/media/Archive/sources/linux/httpd-2.2.15$ sudo make uninstall [sudo] password for activex: make: *** No rule to make target `uninstall'. Stop. activex@activex-desktop:/media/Archive/sources/linux/httpd-2.2.15$
It's the first problem. And the second one is the one that has amazingly confused me:
Are the sources I download from sites, say php, or apache, or even the linux kernel itself, from kernel.org, the real souces, I mean the porgrams written in C/C++ or not?
Are these programs the ones that developers have put time to analyze, put together, etc., just like what Linus Torvalds did 20 years ago, or these C/C++ are the files that have been prepared for me, as a user to swallow?
If I modify these C/C++ source files, have I really modified the software and customized it, or I've fooled myself?
That's all I'm terribly curious to know!0 -
Not all make files will have an uninstall target. you should probably double check the INSTALL or README files to see if they mention such a target (it could make remove, etc).
Yes. Those are the actual applications' source code. Some applications are obviously larger and more complicated than others and will have a larger collection of source files, but that is in essence it. And Yes, if you modify those files, then you hve "customized" the application.
The packages you install using your distro's package manager, hwoever, are not likely to contain any source code, (with a few exceptions, like applications written in interpreted languages, or specif source packages). But if you find yourself downloading a tar ball and having to run ./configure and/or make, you have the source code to the application.0 -
after struggling with apache source, I finally had to give up this method, since I'm a Linux beginner, and also I'm short of time, and I used Synaptic to install apache, php and mysql.
With a search, I found httpd.conf in /etc/apache2/ directory. If you happen to know, this file contains apache global configurations, BUT, the httpd.conf there is totally empty! 0 bytes!
What should I do? What's missing?0 -
It looks like your distro gives you a blank file awaiting your settings.
Attached is the httpd.conf from slackware that has some working and sample settings.
A quick search on google will give you several more examples. [file name=httpd.gz size=5907]http://www.linux.com/media/kunena/attachments/legacy/files/httpd.gz[/file]0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 791 Linux Foundation IT Professional Programs
- 353 Cloud Engineer IT Professional Program
- 178 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 147 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 47 LFC110 Class Forum - Discontinued
- 71 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 38 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 697 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 148 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 29 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 134 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 152 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)