Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45519 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80173 invoked from network); 8 Sep 2009 10:57:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2009 10:57:00 -0000 Authentication-Results: pb1.pair.com header.from=dreamcat4@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dreamcat4@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.226 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dreamcat4@gmail.com X-Host-Fingerprint: 209.85.218.226 mail-bw0-f226.google.com Received: from [209.85.218.226] ([209.85.218.226:51152] helo=mail-bw0-f226.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/A0-09807-A7836AA4 for ; Tue, 08 Sep 2009 06:56:59 -0400 Received: by bwz26 with SMTP id 26so2449458bwz.23 for ; Tue, 08 Sep 2009 03:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=hyKujPclnjv2ULMnFYiorExBONvvzy/8t97vRmyh/lY=; b=N/jlvMT8RsihP5Gb2vES2gbNc4ViEaMovXB26MZyloBkW/ZVmzQI5ZNCDoGVJlNHpH P1KSTp3+3NuTbWiVaRQfExeQC11mlJNtSe6BR7V9BTUk/dcJIg7zOulmqPVEfQe0T+IE FPN3vUTd8DHL4BhiBQJsmAFPl+8nZX4jvyURU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=OS6/UE/S3/2infcNXKE+Fk/buuke4Lp68o/IIFA2604NFllDnpEpuHxTm2omBSk4a6 /tO3r8HGcpkje+1lZOde8B22gCWRJhvzPhNG2cwssSHTXZERl37ZxJ3mQAJPZkInweLC L04D3wp6QFIemO8rJEYl2oEgvYEVns+t1duu8= MIME-Version: 1.0 Received: by 10.223.4.208 with SMTP id 16mr5746235fas.69.1252407415063; Tue, 08 Sep 2009 03:56:55 -0700 (PDT) In-Reply-To: References: <20090904081640.GA28685@joeysmith.com> <4AA25E16.7040803@sci.fi> <30CAA781-B1EE-44E0-AC7B-47FF3DF48FE1@tabini.ca> <698DE66518E7CA45812BD18E807866CE03415400@us-ex1.zend.net> Date: Tue, 8 Sep 2009 11:56:35 +0100 Message-ID: <99cf22520909080356q4e530e1bwd2e4536b94b5f023@mail.gmail.com> To: internals@lists.php.net Cc: dmda@yandex.ru Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] shebang skipping in 5.3.0 From: dreamcat4@gmail.com (dreamcat four) Hi, Can this snippet of shebang checking be removed for php 5.3.+, 6? Its for external FPM project. cgi_main.c: php_fopen_primary_script(&file_handle TSRMLS_CC); if (CGIG(check_shebang_line) && file_handle.handle.fp && (file_handle.handle.fp != stdin)) { /* #!php support */ c = fgetc(file_handle.handle.fp); /* <------- SEGFAULT */ if (c == '#') { while (c != '\n' && c != '\r' && c != EOF) { c = fgetc(file_handle.handle.fp); /* skip to end of line */ } /* handle situations where line is terminated by \r\n */ if (c == '\r') { if (fgetc(file_handle.handle.fp) != '\n') { long pos = ftell(file_handle.handle.fp); fseek(file_handle.handle.fp, pos - 1, SEEK_SET); } } CG(start_lineno) = 2; } else { rewind(file_handle.handle.fp); } } fpm_request_executing(); php_execute_script(&file_handle TSRMLS_CC); Reference: http://marc.info/?l=php-internals&m=121759090811279&w=2 Many thanks in advance, dreamcat4 dreamcat4@gmail.com