|
64 | 64 | # include "mod_dav.h" |
65 | 65 | #endif |
66 | 66 |
|
67 | | -int apache_php_module_main(request_rec *r, int fd, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC); |
| 67 | +int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC); |
68 | 68 | void php_save_umask(void); |
69 | 69 | void php_restore_umask(void); |
70 | 70 | int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC); |
@@ -443,7 +443,7 @@ static char *php_apache_get_default_mimetype(request_rec *r SLS_DC) |
443 | 443 |
|
444 | 444 | int send_php(request_rec *r, int display_source_mode, char *filename) |
445 | 445 | { |
446 | | - int fd, retval; |
| 446 | + int retval; |
447 | 447 | HashTable *per_dir_conf; |
448 | 448 | SLS_FETCH(); |
449 | 449 | ELS_FETCH(); |
@@ -480,11 +480,6 @@ int send_php(request_rec *r, int display_source_mode, char *filename) |
480 | 480 | if (filename == NULL) { |
481 | 481 | filename = r->filename; |
482 | 482 | } |
483 | | - /* Open the file */ |
484 | | - if ((fd = popenf(r->pool, filename, O_RDONLY, 0)) == -1) { |
485 | | - log_reason("file permissions deny server access", filename, r); |
486 | | - return FORBIDDEN; |
487 | | - } |
488 | 483 |
|
489 | 484 | /* Apache 1.2 has a more complex mechanism for reading POST data */ |
490 | 485 | #if MODULE_MAGIC_NUMBER > 19961007 |
@@ -518,12 +513,11 @@ int send_php(request_rec *r, int display_source_mode, char *filename) |
518 | 513 | add_cgi_vars(r); |
519 | 514 |
|
520 | 515 | init_request_info(SLS_C); |
521 | | - apache_php_module_main(r, fd, display_source_mode CLS_CC ELS_CC PLS_CC SLS_CC); |
| 516 | + apache_php_module_main(r, display_source_mode CLS_CC ELS_CC PLS_CC SLS_CC); |
522 | 517 |
|
523 | 518 | /* Done, restore umask, turn off timeout, close file and return */ |
524 | 519 | php_restore_umask(); |
525 | 520 | kill_timeout(r); |
526 | | - pclosef(r->pool, fd); |
527 | 521 | return OK; |
528 | 522 | } |
529 | 523 |
|
|
0 commit comments