LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-13-2004, 12:55 PM   #1
cdrobsonjr
Member
 
Registered: Aug 2002
Location: Friendsville, TN
Distribution: Fedora Core 2
Posts: 44

Rep: Reputation: 15
Apache2 with PHP5 on Fedora C2


Dear friends,

I am having a hairpulling time trying to install )Apache) httpd 2.0.50 with PHP5.0.1.
MySQL will also be a part of the mix eventually, but right not I'm just trying to get
Apache and PHP working together.

I am using the gzipped tarballs for both and attempting to install from source in order
to get all the options the way I want them.

I first ran rpm -e httpd to get rid of the server that comes with the Fedora install.

I've tried a couple of sites suggestions as to running the .configure scripts then make
and make install. Both seem to run to completion without error. I was sure that the
--enable-so option was part of the Apache .configure script as I ran it.

I can start Apache with apachectl start and ps reveals they are there.
I made sure the httpd.conf file included the
LoadModule php5_module module/libphp5.so and
AddType application/x-httpd-php .php .phtml

I verified that the make install put a libphp5.so file exists in
/usr/local/apache/modules

I copied php.ini-dist to /usr/local/lib/php.ini

I also made a file called phpinfo.php which contained:
<?php
phpinfo();
?>
and I put it in /usr/local/apache2/htdocs.

When I try to display that file as http://localhost/php however, all I get is the
actual script text as shown above - which indicates that Apache did not call
PHP to parse the PHP code and render the page via the phpinfo() call.

Anybody use these two versions of Apache and PHP respectively and get it to
compile from source successfully? Anybody care to share your httpd.conf and
php.ini files with me? Anybody care to guide me through what I'm doing wrong?

Thanks,
Doug

PS, if anybody needs to look at my httpd.conf or php.ini files, I can e-mail them to you.
They are too long to post here - or so I thought.
 
Old 09-13-2004, 01:28 PM   #2
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
You might take a look at the Linux From Scratch website. It describes how to build a complete distro from source packages. The relevant section for you would be Beyond Linux From Scratch, which details how to add in extras such as Networking, Xwindows, etc. There are two chapters in the latest testing version of BLFS for compiling Apache-2.0.50 and PHP-5.0.1. While this procedure is specifically for adding it to the base LFS system, it should nevertheless provide some insight into (and perhaps a guideline for) your own situation. BTW, there is also a section for MySQL-4.0.20.

Check it out soon, because this is a daily snapshot, so it's liable to change as soon as a newer version is incorporated into the project.

Enjoy!
--- Cerbere
 
Old 09-13-2004, 04:19 PM   #3
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
"I first ran rpm -e httpd to get rid of the server that comes with the Fedora install."
...which is apache.
 
Old 09-13-2004, 04:32 PM   #4
cdrobsonjr
Member
 
Registered: Aug 2002
Location: Friendsville, TN
Distribution: Fedora Core 2
Posts: 44

Original Poster
Rep: Reputation: 15
In reply to RHEL's commentt .....huh?

I was saying I got rid of the Apache=httpd installation which came with Fedora - - in order then to
install it afresh from source.

Were you thinking I was that much of a newbie that I did not realize Apache was the same as
httpd ? I may be new, but I'm not THAT new.

I will check out the site mentioned by Cebere - thank you. Maybe I can glean enough to figure this
out on my own.

Doug
 
Old 09-13-2004, 04:52 PM   #5
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
'Were you thinking I was that much of a newbie that I did not realize Apache was the same as
httpd ? I may be new, but I'm not THAT new.'

No, but I'm too much of a newbie to fail to understand the advantage/necessity or reinstalling.
...which I didn't really manage to convey in the post.
 
Old 09-13-2004, 05:06 PM   #6
cdrobsonjr
Member
 
Registered: Aug 2002
Location: Friendsville, TN
Distribution: Fedora Core 2
Posts: 44

Original Poster
Rep: Reputation: 15
I got it to work.

I was noticing that the several web sites which were available to help folks get this going all had differenct
directives for the LoadModule php5_module. This bothered me, but I did not realize why.
after doing the make and make install, what was already in my httpd.conf was:
LoadModule php5_module modules/libphp5.so

What was different was the last bit which obviously means the path to the module is a relative path name.
Apparently, that is not a sufficient path name to find the module, for when I experimented by chaning it to
the full path of /usr/local/apache2/modules/libphp5.so, it worked.

I probably did not put some option in the ./configure of either apache or php that would have told
whichever needed to know where that relative path was. Haven't figured that part out yet, but
thought I'd at least tell you I got it to work by substituting a full path for the relative path on my
httpd.conf's LoadModule directive.

Now, it's on to MySQL. I can almost guarantee I'll be back here asking questions again later.
Doug
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SLES9/apache2 and PHP5 scabrous1 SUSE / openSUSE 1 12-15-2005 05:14 AM
Apache2 and PHP5 SpiderIRE Linux - Software 3 09-30-2005 03:25 PM
Apache2 and PHP5 rul3r Slackware 7 09-11-2005 05:21 PM
Apache2 + PHP5.0.3 24jedi *BSD 1 07-21-2005 03:07 PM
Installing Apache2 and PHP5 biglaz Linux - General 1 10-15-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration