LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-28-2006, 02:49 PM   #1
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Rep: Reputation: 15
Apache doesn't execute PHP files?


I've just set up a Slackware 10.2 box to run as a webserver. I'm trying to run the following script:
Code:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>
Apache doesn't execute the PHP code, instead it simply displays the code as a normal text file. mod_php appears to be installed properly (how can I tell if mod_php is installed properly?) here is /etc/apache/mod_php.conf:
Code:
#
# mod_php - PHP Hypertext Preprocessor module
#

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

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

# This will display PHP files in colored syntax form.  Use with caution.
#AddType application/x-httpd-php-source .phps
and of course mod_php.conf contains this line that pulls in mod_php.conf:
Code:
#Include /etc/apache/mod_php.conf
This is pretty much a default slackware install (all packages). any idea what I'm doing wrong?

thanks in advance,
dbc001
 
Old 01-28-2006, 02:53 PM   #2
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Original Poster
Rep: Reputation: 15
oops. looks like the Include part was commented out.
 
Old 01-28-2006, 03:29 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
Glad you found the problem It may also be useful to add index.php to your list of possible index files in httpd.conf if you'll be running a PHP based site:

Code:
DirectoryIndex index.html index.html.var index.php
 
  


Reply


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
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 11:25 AM
php files errors on apache - sometimes amimusa Debian 1 04-07-2005 01:52 PM
Cant Get Apache to execute php pages nevarlen Linux - Newbie 1 02-18-2005 12:48 AM
running apache/php files limp Programming 3 11-07-2004 09:10 PM
Need help to configure Apache TO EXECUTE PHP SCRIPTS mgrapr Linux - Hardware 2 01-21-2004 10:23 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration