LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-28-2004, 01:54 AM   #1
AFI_Flame
Member
 
Registered: Apr 2004
Location: Nolensville, TN
Distribution: OpenSuse 10.2
Posts: 253

Rep: Reputation: 30
Help Setting Up PHP On Apache


I just installed a fresh Slackware 10.0 and I got Apache working but it doesn't seem to want to work with PHP. I thought Slackware came with PHP already installed so I just put this sample test file in htdocs.

Code:
<p>This page was created at <b>
<?php echo date("h:i:s a", time()); ?>
</b> on the computer running PHP.</p>
I named it timetest.php and when I load http://localhost/timetest.php it just gives me back the code insted of showing the time like it's supposed to. I'm kinda half way following the turorial on Dreamweaver on my Windows partition and that's where I got that code from.
 
Old 06-28-2004, 07:27 AM   #2
vbraca
LQ Newbie
 
Registered: Aug 2003
Location: Serbia
Distribution: SuSE
Posts: 29

Rep: Reputation: 15
Edit your httpd.conf file (Apache configuration) and add following lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4
 
Old 06-28-2004, 07:31 AM   #3
ShawnRisk
Member
 
Registered: Jun 2004
Distribution: Slax
Posts: 45

Rep: Reputation: 15
Here is the way to install PHP and other with Apache http://www.start-linux.com/articles/article_79.php When the code comes back that means that you don't have PHP setup on the computer..
 
Old 06-28-2004, 12:44 PM   #4
AFI_Flame
Member
 
Registered: Apr 2004
Location: Nolensville, TN
Distribution: OpenSuse 10.2
Posts: 253

Original Poster
Rep: Reputation: 30
ah ok i got it working now... i had to uncomment this line in my httpd.conf file

Code:
Include /etc/apache/mod_php.conf
 
  


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
Setting up PHP with Apache D4ve G SUSE / openSUSE 8 06-27-2005 11:20 AM
Setting Up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together rhythmking Slackware 2 06-08-2005 04:05 AM
Setting up apache with php and mysql meander Linux - Networking 6 01-26-2005 04:10 AM
apache setting for php tej Linux - Software 2 09-20-2004 07:17 AM
Apache / PHP - OK, what setting am I missing? bkeating Linux - Software 1 12-10-2002 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:45 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