LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-03-2006, 03:52 AM   #1
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
Question PHP files not getting parsed


Installed php 4.2.2 and apache 1.3 , configured httpd.conf and mod_php.conf

uncommented the -> Include /etc/apache/mod_php.conf <- line in httpd.conf file

my mod_php.conf file looks like this
Quote:
#
# mod_php - PHP Hypertext Preprocessor module
#

# Load the PHP module:
LoadModule php4_module /usr/libexec/apache/libphp4.so

# Tell Apache to feed all *.php files through the PHP module:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4

# This will display PHP files in colored syntax form. Use with caution.
AddType application/x-httpd-php-source .phps
Restarted apache, cleared the browser chace , but when i try to execute .php files , the browser tries to download the php file

Now what could be wrong
 
Old 02-03-2006, 05:19 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
Put them all in one line and see what happens even though it should work as is:
Code:
AddType application/x-httpd-php .php .php3 .php4 .phtml

Last edited by bathory; 02-04-2006 at 01:59 AM.
 
Old 02-04-2006, 12:14 AM   #3
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
I really dont understand this, AFAIK i have done everything correct , but still unable to get .php files to be parsed ,
 
Old 02-04-2006, 12:47 AM   #4
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Are you sure you're editing the correct httpd.conf? ~Just a thought...
 
Old 02-04-2006, 12:59 AM   #5
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
If it tries to download the file then php is not loaded right.
It can be the DirectoryIndex line in httpd.conf.
it should look something like this
DirectoryIndex index.php index.html

Last edited by Nille_kungen; 02-04-2006 at 01:02 AM.
 
Old 02-04-2006, 02:03 AM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
The only differences I see, is that in my mod_php.conf file, the path to libphp4.so is relative: LoadModule php4_module libexec/apache/libphp4.so
And I also have: AddModule mod_php4.c
As mrdarby said, make sure you're editing the right file.

Last edited by gbonvehi; 02-04-2006 at 02:20 AM.
 
Old 02-04-2006, 02:50 AM   #7
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
hmmm , thanks for the suggestions
 
Old 02-04-2006, 04:39 AM   #8
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
Now the php files doesnt get downloaded , but just shows up as normal text
 
Old 02-04-2006, 04:50 AM   #9
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
Well, its working now :d

Thanks for the suggestions
 
Old 02-04-2006, 05:07 AM   #10
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
what was it??
 
Old 02-04-2006, 05:11 AM   #11
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Original Poster
Rep: Reputation: 30
i really dunno , i didnt nothing other then the steps i had wrote when i started this thread, might have been the cache

its working now though
 
  


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
/etc/modprobe.conf not being parsed? mrjamin Fedora 1 01-18-2006 02:33 PM
When is hosts.deny parsed? juanbobo Linux - General 1 11-29-2005 09:32 PM
Tearing My Hair Out: PHP isnt being parsed by Apache 2!! pnh73 Linux - Software 2 01-19-2004 04:01 PM
Non-Parsed-Header scripts soulsniper Linux - Software 0 11-22-2003 02:33 PM
Apache2, php code parsed as *.shtml bmar Linux - General 4 06-29-2003 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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