LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-19-2006, 12:57 AM   #1
Beck24
LQ Newbie
 
Registered: Jan 2005
Distribution: Suse 9.1
Posts: 17

Rep: Reputation: 0
php not working on apache server


I'm setting up a server for the first time, it's remote so I'm using ssh to install everything.
I followed this walkthrough: http://www.howtoforge.com/perfect_setup_ubuntu_5.10
as best I could, and most of it has been successful.
However... when I access a php file on my browser it displays the code, instead of the actual page. I'm sure I'm missing something in the php or apache configuration, but I don't know what.
Any ideas?
 
Old 01-19-2006, 01:02 AM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
did you add the correct AddHandler and AddType directives for php in your httpd.conf file?

and what version of apache and php are you running?
 
Old 01-19-2006, 01:08 AM   #3
Beck24
LQ Newbie
 
Registered: Jan 2005
Distribution: Suse 9.1
Posts: 17

Original Poster
Rep: Reputation: 0
you're right, there's nothing there... do you know specifically what I should add?

it's apache2... whatever the latest ubuntu .deb release is, and php4
 
Old 01-19-2006, 01:12 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
make sure these lines are in your httpd.conf file.

Code:
LoadModule php4_module        modules/libphp4.so

Code:
AddHandler php-script .php
AddType text/html .php
Also make sure you have libphp4.so in /full_path_to/apache_install/modules

edit: note that you'll need to figure out what the correct module name for php4 is. I use php5 and I don't remember what the module name for php4 is and just guessed at what it could've been.

Last edited by megaspaz; 01-19-2006 at 01:14 AM.
 
  


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
Apache config for PHP (not working) Thanotos Slackware 2 11-30-2005 12:52 AM
Apache/PHP not working Seventh Linux - Software 1 06-23-2005 05:37 PM
setting up a slack, apache server with php and a sql server. caged Slackware 1 10-25-2004 04:45 AM
Apache + PHP not working WiWa Linux - Networking 3 10-18-2004 06:48 AM
PHP not working with Apache, nor mysql wldkos Linux - Software 18 05-16-2003 12:23 PM

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

All times are GMT -5. The time now is 12:20 PM.

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