SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2000
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apache 1.3.12
    PHP 3.0.16
    Redhat 6.2

    It appears I'm having problems getting Apache to parse in line php scripts. If I create a file phpinfo.php3 and put in phpinfo(), I get output as expected. Very simple inline code like:

    <html>
    <body>
    <?php

    echo ("hello world");

    ?>

    </body>
    </html>

    produces no output and the browser shows the source as not being parsed.

    I followed the static install for apache and php with the only change being --prefix=/var/local/apache

    Any help would be appreciated

    Thanks

    Dan Lynch

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It appears that Apache is not recognising .php3 as a file it should start php for.

    Find the file called httpd.conf (Usually in /etc/httpd/conf on RedHat - I think or /usr/local/apache/conf) and check for the following line:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    AddType application/x-httpd-php3 .php3
    [/code]

    if it has # at the begining then remove it, if it does not exist then add it and give it a try. If you are using PHP4 then remove the 3 from the x-httpd-php3 bit.

    If you still have no joy then post again and tell us if you are running the module or CGI version of php (3 or 4).

    ------------------
    Karl Austin
    KDA Web Services
    "Everyone has a photographic memory. Some just don't have film."

  3. #3
    SitePoint Member
    Join Date
    Jul 2000
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems to work fine for php commands in a .php3 script file. It doesn't work if it the php code is imbedded in the php tags. I am currently using Apache compiled modules, not CGI. If I do compile a CGI module where does it belong, the php3 executable.


Bookmarks

Posting Permissions

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