Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I am trying to get PHP5 working on Apache 2.2.13. When loading the PHP file in the web browser, the server does not appear to be passing the php ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    3

    Smile PHP on Slackware 13 64


    Hello,
    I am trying to get PHP5 working on Apache 2.2.13. When loading the PHP file in the web browser, the server does not appear to be passing the php off to the interpreter. Instead, the browser just treats the first command as an HTML comment and displays the rest to the user.

    Relevant lines from httpd.conf:
    LoadModule php5_module lib64/httpd/modules/libphp5.so
    AddType text/html .php
    #AddType application/x-httpd-php .php
    AddHandler php-script .php

    The second AddType is commented out because it causes Firefox to try and download the php instead of displaying it.

  2. #2
    Just Joined!
    Join Date
    Jan 2010
    Posts
    3
    Output from httpd -M:
    Loaded Modules:
    core_module (static)
    mpm_prefork_module (static)
    http_module (static)
    so_module (static)
    php5_module (shared)
    .
    .
    .
    .

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    3

    Smile Got it!

    Got it working! Have the following lines in httpd.conf:


    Code:
        AddType text/html .php
        AddType application/x-httpd-php .php
        AddHandler php-script .php
        <FilesMatch "\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •