- PHP-FPM SAPI:
. Fixed bug #60179 (php_flag and php_value does not work properly). (fat)
+ . enhance error log when the primary script can't be open. FR #60199. (fat)
- Intl:
. Fixed bug #60192 (SegFault when Collator not constructed
SG(server_context) = (void *) &request;
init_request_info(TSRMLS_C);
CG(interactive) = 0;
+ char *primary_script = NULL;
fpm_request_info();
/* If path_translated is NULL, terminate here with a 404 */
if (!SG(request_info).path_translated) {
zend_try {
+ zlog(ZLOG_DEBUG, "Primary script unknown");
SG(sapi_headers).http_response_code = 404;
+ PUTS("File not found.\n");
} zend_catch {
} zend_end_try();
goto fastcgi_request_done;
goto fastcgi_request_done;
}
+ /*
+ * have to duplicate SG(request_info).path_translated to be able to log errrors
+ * php_fopen_primary_script seems to delete SG(request_info).path_translated on failure
+ */
+ primary_script = estrdup(SG(request_info).path_translated);
+
/* path_translated exists, we can continue ! */
if (php_fopen_primary_script(&file_handle TSRMLS_CC) == FAILURE) {
zend_try {
+ zlog(ZLOG_ERROR, "Unable to open primary script: %s (%s)", primary_script, strerror(errno));
if (errno == EACCES) {
SG(sapi_headers).http_response_code = 403;
PUTS("Access denied.\n");
php_execute_script(&file_handle TSRMLS_CC);
fastcgi_request_done:
+ if (primary_script) {
+ efree(primary_script);
+ }
+
if (request_body_fd != -1) {
close(request_body_fd);
}