LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   php on apache problems (https://www.linuxquestions.org/questions/linux-software-2/php-on-apache-problems-67058/)

andrew001 06-21-2003 10:53 AM

php on apache problems
 
Hi~

After much pain last night I finished compiling Apache 1.3.27 from the source, and php v 4.3.2 . I compile libphp4.so 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.

Thanks,
Andrew

PS: LoadModule php4_module libexec/libphp4.so is in httpd.conf like it should be. :)

david_ross 06-21-2003 10:55 AM

Have you added a php AddType directive?

bulliver 06-21-2003 02:53 PM

Code:

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.

andrew001 06-21-2003 04:14 PM

Duh! I completely forgot! Thanks for helping me.


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