LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 11-02-2005, 07:38 AM   #1
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Rep: Reputation: 30
help installing PHP5 for Apache


Hey all,

I am running apache 2.0.54 and I am trying to install PHP support.
I have downloaded php, unzip, configured, make, and make install.
copied the ini file to /usr/local/lib

and tried added this to /etc/httpd/conf/httpd.conf
Code:
LoadModule php5_module libexec/libphp5.so
when i try to start the httpd service via.. /etc/init.d/httpd start
it fails, with no error message.

Can anyone help me.
THanks so much.
JOsh
 
Old 11-02-2005, 07:46 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Do you not need to put the full path to the php module into your httpd.conf? Also, if you try running
Code:
apachectl configtest
it should run through checking the apache config file and let you know of any errors. I'm not sure if it checks modules are in the right place though.
 
Old 11-02-2005, 07:58 AM   #3
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Original Poster
Rep: Reputation: 30
Yes running the configtest throws an error:
Code:
Syntax error on line 190 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/libexec/libphp5.so into server: /etc/httpd/libexec/libphp5.so: cannot open shared object file: No such file or directory
i tried locating the php module and did not find it...i have downloaded the tar file to my home directory (a sub folder) extracted it there, and ran the configs there. Should the module have been automatically placed elsewhere??

Thanks
 
Old 11-02-2005, 09:29 AM   #4
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Can't remember where it should off the top of me head. Try (as root):
Code:
updatedb
and then
Code:
locate libphp5.so
to find where it is located. Adjust your httpd.conf file accordingly so that it looks to right place, then do the apachectl configtest again.
 
Old 11-02-2005, 09:39 AM   #5
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Original Poster
Rep: Reputation: 30
Yes, i already have done that. and found nothing.

Might i have done something wrong in the configuration? i dont understand.
I ran the configuration script, ran make, and make install.

SHould i try something else.

thanks for the help.
 
Old 11-02-2005, 02:14 PM   #6
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,376

Rep: Reputation: 147Reputation: 147
Hi,

Just been looking at my system:

libphp5.so

is in /etc/httpd/modules

My apacher config file has the following lines:
Code:
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
And in the conf.d directory there is a php.conf file as follows:
Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
The only reference to php that I have in httpd.conf is a directory index line that I had added.

I hope that can help you.

graeme.
 
Old 11-03-2005, 10:59 AM   #7
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Original Poster
Rep: Reputation: 30
HMM.

I just check in my /etc/http/modules directory, and the php module is not in it??
So im thinking i did something wrong during the configuration, but i dont know what.

I know very vague, but any help?
thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache and PHP5 Problem (FC4) jjwl89 Linux - Software 5 06-07-2007 08:59 PM
Apache and PHP5 Mogatu Linux - Software 3 06-17-2005 03:43 PM
Problems configuring apache for php5 Besnell Mandriva 3 12-28-2004 09:01 AM
Make Apache, PHP5 and MySQL work together on MDK 10.0 krolben Mandriva 2 11-18-2004 08:02 AM
installing PHP4 and PHP5 on apache jerry_redhat Linux - Software 2 07-08-2003 10:27 PM


All times are GMT -5. The time now is 03:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration