Current location: Hot Scripts Forums » Programming Languages » PHP » php/apacher server displaying php code


php/apacher server displaying php code

Reply
  #1 (permalink)  
Old 12-15-04, 11:55 AM
doctork1 doctork1 is offline
New Member
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
php/apacher server displaying php code

Help !

I am trying to configure an Apache/php/mysql server and it displays the php code in html programs instead of running them

The install includes redhat 9 mysql-3.23.54a cronolog-1.6.2 httpd-2.0.52 openssl-0.9.7e & php-4.3.9

I modified the httpd.conf file as instructed

<Files *php>
SetOutputFilter PHP
SetInputFilter PHP
<?Files>

AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps

Last edited by doctork1; 12-15-04 at 11:58 AM.
Reply With Quote
  #2 (permalink)  
Old 12-15-04, 12:05 PM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
did you restart httpd?
__________________
Yep, it's a signature...
Reply With Quote
  #3 (permalink)  
Old 12-15-04, 12:10 PM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
Also, since your running apache 2.0, try this.

I looked at a default install of a fedora box that I did, and it's using the apache 2.0 stuff. The lines for php aren't in the httpd.conf file, but rather, in the php.conf in the conf.d folder.

/etc/httpd/conf.d/php.conf

I looked in that folder and vi'd php.conf. Here's what I have in that file.
Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
__________________
Yep, it's a signature...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help In PHP Programming for a single code suggestion !! CyberRomeo PHP 1 11-27-04 10:38 AM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 11:19 AM
PHP code on a remote file tonniar .rm PHP 2 05-24-04 02:32 AM
How to sale php code to customer without giving him code pradeep_soft PHP 4 03-12-04 12:10 PM
protecting code in PHP ckb PHP 12 01-02-04 08:53 AM


All times are GMT -5. The time now is 05:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.