SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make PHP3 files work on Apache server

    I've gotten this job of managing an old website, but the problem is that all files end with *.php3 and not just *.php. When I try to view a php3 file on my localhost it just writes all the php code as text in the browser. (I'm running Apache server and PHP 4.2.7).

    How can I make it parse php3 files as well as php files. I read somewhere about adding a module to the Apache server, but I didn't get alot of it.

    Any help is appreciated.

  2. #2
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Parry Sound, ON
    Posts
    725
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this in an .htaccess file:
    Code:
    AddType application/x-httpd-php .php .php4 .php3 .phtml

  3. #3
    SitePoint Addict trogdor1024's Avatar
    Join Date
    Oct 2004
    Location
    New Jersey
    Posts
    235
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go to the httpd.conf file in your apache configuration directory.

    1. Find the line that starts with AddType application/x-httpd-php. Add .php3 to the end.
    2. Find the line that starts with DirectoryIndex. Add index.php3.

    Code:
    .
    .
    DirectoryIndex index.php index.php3 index.html
    .
    .
    .
    AddType application/x-httpd-php .php .php3
    .
    .

  4. #4
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for replying so fast.
    I did what troqdor1024 said and it worked perfectly

    Thanks again!


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
  •