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
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- 1 Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 1.4K LFS258 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 945 Programming and Development
- 310 Kernel Development
- 617 Software Development
- 978 Software
- 370 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class 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)