Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 06-21-2003, 11:53 AM   #1
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321

Rep: Reputation: 30
php on apache problems


After much pain last night I finished compiling Apache 1.3.27 from the source, and php v 4.3.2 . I compile via apxs into apache/libexec, and it seems to be working correctly (not generating any errors).

The other module that I compiled into apache was ssl, and it seems to be working correctly, but I cannot get php embedded into my html to work atall. A file such as 'test.php' with the contents:

<?php echo 'Hello world!'; ?>

just displays in the browser when called, rather than being interpreted and returned to it. I have no idea what is going wrong, so any ideas would be very appreciated.


PS: LoadModule php4_module libexec/ is in httpd.conf like it should be.
Old 06-21-2003, 11:55 AM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Have you added a php AddType directive?
Old 06-21-2003, 03:53 PM   #3
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
AddType application/x-httpd-php .php
Add that to the section that looks like:

# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.

in httpd.conf

You can create your own custom suffix if you like here ie; just add ".myowncrazysuffix" after .php

You need to tell apache which files are to be processed by the php interpreter.
Old 06-21-2003, 05:14 PM   #4
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321

Original Poster
Rep: Reputation: 30
Duh! I completely forgot! Thanks for helping me.


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
Problems with PHP on Apache Super Tijano Linux - Software 3 11-19-2005 02:21 PM
Apache 1.3.33 + PHP 5.02 problems... NuTBoMbS Linux - Software 1 11-09-2004 02:36 AM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 05:57 PM
Apache and Php problems myguest Linux - Software 6 06-11-2004 10:28 AM
php + apache problems nocturnal Linux - Software 1 07-02-2003 08:50 PM > Forums > Linux Forums > Linux - Software

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration