SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    U.S.
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php printed in the browser

    Hi,
    Can you guys tell me how to fix the problem of configuring the httpd.conf on mac? Basically I used terminal to add those as followings:
    Code:
    <IfModule mod_php4.c>
        # If php is turned on, we repsect .php and .phps files.
        LoadModule php4_module
    AddModule mod_php4.c
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    
        # Since most users will want index.php to work we
        # also automatically enable index.php
        <IfModule mod_dir.c>
            DirectoryIndex index.html index.php
        </IfModule>
    </IfModule>
    hit Control + X and hit Y to save this , but it is still showing this without save the changes:
    Code:
    <IfModule mod_php4.c>
        # If php is turned on, we repsect .php and .phps files.
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps
    
        # Since most users will want index.php to work we
        # also automatically enable index.php
        <IfModule mod_dir.c>
            DirectoryIndex index.html index.php
        </IfModule>
    </IfModule>
    It is missing: LoadModule php4_module
    AddModule mod_php4.c


    That is why it is printing
    Code:
    <?php
    phpinfo();
    ?>
    when I called it at:http://localhost/charlton/phpinfo.php

    Not sure why, can you please help me out of this problem? Much appreciated!

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With some versions of Apache you need to stop the Apache service first.
    Then make adjustments, and after saving changes restart the service.
    FOR SALE: 1 set of morals, never used, will sell cheap

  3. #3
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    U.S.
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hexburner View Post
    With some versions of Apache you need to stop the Apache service first.
    Then make adjustments, and after saving changes restart the service.
    Thanks my friend.


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
  •