Women in Technology

Hear us Roar



Article:
  PHP 4.3 and Mac OS X
Subject:   Files with php3 extensions will not execute.
Date:   2003-06-10 08:29:09
From:   anonymous2
Files with php extensions work correctly, files with php3 extentions will not work. I am running php4.1.2 and Apache 1.3.27 on Mac OS X.


Is the problem that php4 doesnt recognise the php3 extension?


I have added following line to the htttpd.conf file


#######################


# For example, the PHP 3.x module will typically use:
#
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
#
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps



############################


Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Adam Trachtenberg photo Files with php3 extensions will not execute.
    2003-06-10 09:17:13  Adam Trachtenberg | O'Reilly Author [View]

    I'm not 100% positive what you want to happen, so I'll give you two answers and hope one of them hits its mark.

    If you want files ending in .php3 to be parsed by PHP 4.1.2 (and therefore treated as PHP 4 files), you should change the top two lines to this new one line:

    AddType application/x-httpd-php .php3

    And then restart Apache by entering "sudo apachectl restart" in Terminal.

    Right now, Apache is trying to run these files under PHP 3, which isn't installed.

    This is what I think you want. There is also a smaller chance that you actually want PHP 3 to execute these files. It seems unlikely because PHP 3 is very old and obsolete. If that's so, however, you're out of luck. You cannot run PHP 3 on your Macintosh. You should consider porting the files to PHP 4. See http://us4.php.net/manual/en/migration4.php for more details.