* of it by stat'ing back through the '/'
* this fixes url's like /info.php/test
*/
- if (stat( script_path_translated, &st ) == -1 ) {
+ if (script_path_translated && stat( script_path_translated, &st ) == -1 ) {
char *pt = estrdup(script_path_translated);
int len = strlen(pt);
char *ptr;
if we are unable to open path_translated and we are not
running from shell (so fp == NULL), then fail.
*/
- if (retval == FAILURE || file_handle.handle.fp == NULL) {
+ if (retval == FAILURE && file_handle.handle.fp == NULL) {
SG(sapi_headers).http_response_code = 404;
PUTS("No input file specified.\n");
php_request_shutdown((void *) 0);