diff -r -u suphp-0.5.2-argv0/src/apache2/mod_suphp.c suphp-0.5.2-php345/src/apache2/mod_suphp.c
--- suphp-0.5.2-argv0/src/apache2/mod_suphp.c	2005-02-11 13:47:30.000000000 +0100
+++ suphp-0.5.2-php345/src/apache2/mod_suphp.c	2005-02-11 15:03:20.000000000 +0100
@@ -33,6 +33,7 @@
 #include "util_script.h"
 #include "util_filter.h"
 
+#define PHP3TYPE "application/x-httpd-php3"
 #define PHP4TYPE "application/x-httpd-php4"
 #define PHP5TYPE "application/x-httpd-php5"
 
@@ -333,22 +334,23 @@
     core_conf = (core_dir_config *) ap_get_module_config(r->per_dir_config, &core_module);
 
     /* only handle request if x-httpd-php handler is asigned */
-
-    if ( (strcmp(r->handler, PHP4TYPE) && strcmp(r->handler, PHP4TYPE)) && (strcmp(r->handler, PHP5TYPE) && strcmp(r->handler, PHP5TYPE)) )
-        return DECLINED;
-
+    if (!strcmp(r->handler, PHP3TYPE)) {
+        /* this is a php3 request */
+        phpversion = 3;
+    } else {
         if (!strcmp(r->handler, PHP4TYPE)) {
-                /* this is a php4 request */
-                phpversion = 4;
+            /* this is a php4 request */
+            phpversion = 4;
         } else {
             if (!strcmp(r->handler, PHP5TYPE)) {
                 /* this is a php5 request */
                 phpversion = 5;
             } else {
                 /* this should not happen, error out */
-                return 500;
+                return DECLINED;
             }
         }
+    }
 
 
     /* check if suPHP is enabled for this request */
@@ -425,15 +427,19 @@
     /* add php version to env */
 
     if (phpversion) {
-        if (phpversion == 4) {
-            apr_table_setn(r->subprocess_env, "PHP_VERSION", "PHP4");
+        if (phpversion == 3) {
+            apr_table_setn(r->subprocess_env, "PHP_VERSION", "PHP3");
         } else {
-            if (phpversion == 5) {
-                apr_table_setn(r->subprocess_env, "PHP_VERSION", "PHP5");
+            if (phpversion == 4) {
+                apr_table_setn(r->subprocess_env, "PHP_VERSION", "PHP4");
+            } else {
+                if (phpversion == 5) {
+                    apr_table_setn(r->subprocess_env, "PHP_VERSION", "PHP5");
+                }
             }
         }
-    }
-    
+    }       
+
     if (r->headers_in)
     {
         const char *auth = NULL;
diff -r -u suphp-0.5.2-argv0/src/suphp.c suphp-0.5.2-php345/src/suphp.c
--- suphp-0.5.2-argv0/src/suphp.c	2005-02-11 13:49:03.000000000 +0100
+++ suphp-0.5.2-php345/src/suphp.c	2005-02-11 15:03:06.000000000 +0100
@@ -36,6 +36,7 @@
 {
  char *php_config;
  char *env;
+ char *const argv3[] = { OPT_PATH_TO_PHP3, NULL };
  char *const argv4[] = { OPT_PATH_TO_PHP4, NULL };
  char *const argv5[] = { OPT_PATH_TO_PHP5, NULL };
  char *const *envp;
@@ -79,16 +80,17 @@
  
  envp = suphp_copyenv((const char **) environ);
 
- // Exec PHP
- //execve(OPT_PATH_TO_PHP, argv, envp);
-
- if (strcmp(phpversion, "PHP4") == 0) {
-  execve(OPT_PATH_TO_PHP4, argv4, envp);
+ if (strcmp(phpversion, "PHP3") == 0) {
+  execve(OPT_PATH_TO_PHP3, argv3, envp);
  } else {
-  if (strcmp(phpversion, "PHP5") == 0) {
-   execve(OPT_PATH_TO_PHP5, argv5, envp);
+  if (strcmp(phpversion, "PHP4") == 0) {
+   execve(OPT_PATH_TO_PHP4, argv4, envp);
   } else {
-   error_sysmsg_exit(ERRCODE_UNKNOWN, "No PHP version given!", __FILE__, __LINE__);
+   if (strcmp(phpversion, "PHP5") == 0) {
+    execve(OPT_PATH_TO_PHP5, argv5, envp);
+   } else {
+    error_sysmsg_exit(ERRCODE_UNKNOWN, "No PHP version given!", __FILE__, __LINE__);
+   }
   }
  }
 
diff -r -u suphp-0.5.2-argv0/src/suphp.h suphp-0.5.2-php345/src/suphp.h
--- suphp-0.5.2-argv0/src/suphp.h	2005-02-11 13:47:30.000000000 +0100
+++ suphp-0.5.2-php345/src/suphp.h	2005-02-11 15:03:07.000000000 +0100
@@ -42,6 +42,10 @@
 #define OPT_APACHE_USER "wwwrun"
 #endif
 
+#ifndef OPT_PATH_TO_PHP3
+#define OPT_PATH_TO_PHP3 "/usr/local/php3/bin/php"
+#endif
+
 #ifndef OPT_PATH_TO_PHP4
 #define OPT_PATH_TO_PHP4 "/usr/local/php4/bin/php"
 #endif
