SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    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)
    All you have to do for linux is change the c:/php3 and c:/php4 to the paths where you installed the versions of php to.

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

  2. #2
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can I set Apache to recognise .PHP files as PHP4? Every time I open the files with a PHP extension it shows me the actual source code instead of the processed file.

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This confuses me...the extension for PHP4 files is .php...are you sure you don't mean PHP3; because that one requires files to be named with a .php3 extension?

    I could be way off...

    ------------------
    Chris Bowyer
    MyCoding.com: Join our mailing list for launch notification!
    "I'm not an insomniac, I'm a web designer."

  4. #4
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, my server (localhost, and that means it is on my computer!) already recognises .php3 files as php3. However, I want to get a script called back-end working on my computer but that requires PHP4. I have already installed PHP4 on my computer but now what I need is the instruction to get Apache to recognise .php files as PHP4. I'm almost sure this will require fiddling about with the httpd.conf file.

  5. #5
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I must be out of my zone here then...



    ------------------
    Chris Bowyer - Programmer in Training
    MyCoding.com: Join our mailing list for launch notification!
    "I'm not an insomniac, I'm a web designer."

  6. #6
    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 is the same set of directives but remove the 3 from them and it should work as long as you have installed PHP3 & 4 to different directories e.g.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    ScriptAlias /php3/ "c:/php3/"
    AddType application/x-httpd-php3 .php3
    Action application/x-httpd-php3 "/php3/php.exe"

    ScriptAlias /php4/ "c:/php4/"
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php4/php.exe"
    [/code]

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

  7. #7
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was actually expecting to get a code for Linux, but I'll try this one for Windows anyway.

  8. #8
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The above Windows-specific code for setting up PHP4 on Apache will result in a very slow CGI-based installation.

    The complete installation procedure and configuration steps for PHP4 as a loadable module under Apache for Linux (including deinstalling PHP3 and setting up Apache to recognize .php files as PHP4 scripts) are given in Part 1 of my series: Building a Database-Driven Web Site using PHP and MySQL. I highly recommend you use this method.


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

    [This message has been edited by kyank (edited July 04, 2000).]

  9. #9
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks!

  10. #10
    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)
    If anyone else is interested then PHP can be compiled as a module for Apache on Windows as well, it is available from http://www.geocities.com/ro_marius/mod_php4.html , it's not my page, but it is very useful if you don't own a C compiler or don't fancy attempting it - If you do then the site explains compiling it as well (It is well worth the effort to compile it).

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


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
  •