cvs: php4 /sapi/apache mod_php4.c sapi_apache.c
| From: | Thies C. Arntzen | Date: | Mon, 10 Jul 2000 07:57:01 +0000 |
| Subject: | cvs: php4 /sapi/apache mod_php4.c sapi_apache.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-694@lists.php.net to get a copy of this message | ||
thies Mon Jul 10 00:57:01 2000 EDT
Modified files:
/php4/sapi/apache mod_php4.c sapi_apache.c
Log:
@- Fixed closing
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.57 php4/sapi/apache/mod_php4.c:1.58
--- php4/sapi/apache/mod_php4.c:1.57 Sun Jul 9 05:51:01 2000
+++ php4/sapi/apache/mod_php4.c Mon Jul 10 00:57:01 2000
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.57 2000/07/09 12:51:01 kara Exp $ */
+/* $Id: mod_php4.c,v 1.58 2000/07/10 07:57:01 thies Exp $ */
#define NO_REGEX_EXTRA_H
#ifdef WIN32
@@ -64,7 +64,7 @@
# include "mod_dav.h"
#endif
-int apache_php_module_main(request_rec *r, int fd, int display_source_mode CLS_DC ELS_DC PLS_DC
SLS_DC);
+int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC);
void php_save_umask(void);
void php_restore_umask(void);
int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC);
@@ -443,7 +443,7 @@
int send_php(request_rec *r, int display_source_mode, char *filename)
{
- int fd, retval;
+ int retval;
HashTable *per_dir_conf;
SLS_FETCH();
ELS_FETCH();
@@ -480,11 +480,6 @@
if (filename == NULL) {
filename = r->filename;
}
- /* Open the file */
- if ((fd = popenf(r->pool, filename, O_RDONLY, 0)) == -1) {
- log_reason("file permissions deny server access", filename, r);
- return FORBIDDEN;
- }
/* Apache 1.2 has a more complex mechanism for reading POST data */
#if MODULE_MAGIC_NUMBER > 19961007
@@ -518,12 +513,11 @@
add_cgi_vars(r);
init_request_info(SLS_C);
- apache_php_module_main(r, fd, display_source_mode CLS_CC ELS_CC PLS_CC SLS_CC);
+ apache_php_module_main(r, display_source_mode CLS_CC ELS_CC PLS_CC SLS_CC);
/* Done, restore umask, turn off timeout, close file and return */
php_restore_umask();
kill_timeout(r);
- pclosef(r->pool, fd);
return OK;
}
Index: php4/sapi/apache/sapi_apache.c
diff -u php4/sapi/apache/sapi_apache.c:1.17 php4/sapi/apache/sapi_apache.c:1.18
--- php4/sapi/apache/sapi_apache.c:1.17 Mon Jun 5 16:21:57 2000
+++ php4/sapi/apache/sapi_apache.c Mon Jul 10 00:57:01 2000
@@ -19,7 +19,7 @@
| Stig Bakken <ssb@fast.no> |
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache.c,v 1.17 2000/06/05 23:21:57 sas Exp $ */
+/* $Id: sapi_apache.c,v 1.18 2000/07/10 07:57:01 thies Exp $ */
#define NO_REGEX_EXTRA_H
#ifdef WIN32
@@ -59,23 +59,18 @@
/*#include "mod_php4.h"*/
-int apache_php_module_main(request_rec *r, int fd, int display_source_mode CLS_DC ELS_DC PLS_DC
SLS_DC)
+int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC)
{
zend_file_handle file_handle;
if (php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC) == FAILURE) {
return FAILURE;
}
-#ifdef PHP_WIN32
/* sending a file handle to another dll is not working
// so let zend open it.
*/
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.handle.fd = 0;
-#else
- file_handle.type = ZEND_HANDLE_FD;
- file_handle.handle.fd = fd;
-#endif
file_handle.filename = SG(request_info).path_translated;
file_handle.free_filename = 0;