Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-17-2005, 12:57 AM   #1
Registered: Sep 2003
Location: USA
Distribution: Ubuntu 20.04
Posts: 111

Rep: Reputation: 15
configuring apache, php

I'm running slackware, and want to get apache and php to work together. The final goal is to get phpBB2 working. As of now Apache works and will host regular html files. However when I attempt to open a .php file that the Apache is serving it just shows the php source as text.

My best guess is that php and apache aren't properly configured to work together. The only thing I came across is that when manually doing the whole ./configure, make, make install process that one needs to show apache where php is and php where apache is. Since this was installed as a binary (I believe it comes off the cd as a binary) I can't exactly just reinstall.

Any ideas of what causes this, and how to fix it?

As always any help is greatly appreciated.
Old 09-17-2005, 01:25 AM   #2
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
In your /etc/apache folder, do you have a file called mod_php.conf? If so, open up your /etc/apache/httpd.conf file and add

Include /etc/apache/mod_php.conf

to it and restart your server (my Include line is right at the bottom of httpd.conf). Does that help?
Old 09-17-2005, 10:35 AM   #3
Registered: Sep 2003
Location: USA
Distribution: Ubuntu 20.04
Posts: 111

Original Poster
Rep: Reputation: 15
The php_conf file exists, and so does that Include line, which I uncommented. Unfortunatly this does not solve the problem, the php source still shows up as text.
Old 09-20-2005, 12:13 AM   #4
Registered: Sep 2003
Location: USA
Distribution: Ubuntu 20.04
Posts: 111

Original Poster
Rep: Reputation: 15
Since I'm still having the problem of php source showing up as text...

Does anybody know how I can determine which piece of software is causing the problem? i.e. How can I know that it is PHP is causing the problem and not Apache, or vice versa?

Man pages, README's, searching the forum, all seems to be getting nowhere, I just need a good clue of where to start. Would it be helpful to just uninstall each package and then install from source? Since they're allready installed, and Apache is working I think that's just as likely to cause new problems as to fix old ones. Because of this I'm reluctant to do it. I'd rather figure out why it isn't working.

Last edited by mjl3434; 09-20-2005 at 12:20 AM.
Old 09-22-2005, 06:49 PM   #5
Registered: Jan 2004
Location: USA
Distribution: macOS, OpenBSD
Posts: 669

Rep: Reputation: 34
I'm using tinysofa and have php4 and mysql4 installed. I have the same problem, that the source is displayed and not the actual page. I do not have an /etc/apache directory, and do not have a 'php_conf' file.

I'm trying to get 'bytehoard' to work, and it uses mysql and php4 (not 5).

How do you get apache to use the php stuff... i don't know much about webservices


*EDIT** oops... i'm sorry, i forgot to restart apache. It works now! Didn't the thread closely enough.

Last edited by student04; 09-22-2005 at 06:59 PM.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring php for apache PennyroyalFrog Linux - Newbie 3 02-07-2008 11:58 PM
Configuring PHP with Apache. LinuxStart Linux - Software 6 07-11-2005 09:15 AM
Configuring Apache, PHP AND mySql Stryks Linux - Newbie 2 10-14-2004 02:02 AM
Configuring php on apache Dakkar Linux - Software 5 06-01-2004 09:26 AM
Configuring Apache and PHP... causticmtl Slackware 2 07-06-2003 01:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:57 AM.

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