Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51762 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58728 invoked from network); 31 Mar 2011 10:41:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2011 10:41:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:52398] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/E5-16878-26A549D4 for ; Thu, 31 Mar 2011 05:41:38 -0500 Received: by qwi4 with SMTP id 4so1532250qwi.29 for ; Thu, 31 Mar 2011 03:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:from:date:message-id :subject:to:content-type; bh=vQMfS0Ys0xjDoVymv4n12ZcAy1Ifk8bTHdnYqJUW8WE=; b=YUv8GNViw6fsE+NwO5WEHaX8sjFjVvownCm9HLh4s/CjQAQp3sQnVLcM2HKJ5w/BWN 2w1J8udt2aDtAhCL/Jtuu90r3wv6jjb3fq+rcLbLF5cmlcY4GkuK3NfvRLp/tRZFuoHE bHIf3+82aarioX5XtJDaaQfbpMOvPQlGSBvV8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=gsyzCME+JrDHUXVb37Euh3D+l+LrRRvDibGid2GZHFWrXHpufM4F8ghtDZuutYA+8N zopAT3sjLHBGD1H2e+BObtLk6bU7Y3Jp/JgEWbZ8kJ1PTMe2NhsVdhrXTHszf0gLgUCM dHhJHzPPrjfnIuKzIGPxNVlRWfkWH8naQdMKo= Received: by 10.229.62.8 with SMTP id v8mr2106389qch.33.1301568095477; Thu, 31 Mar 2011 03:41:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.40.147 with HTTP; Thu, 31 Mar 2011 03:41:14 -0700 (PDT) Reply-To: RQuadling@googlemail.com Date: Thu, 31 Mar 2011 11:41:14 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Displaying a loggable error during PHP_MINIT_FUNCTION and suppressing the loading of the module. From: rquadling@gmail.com (Richard Quadling) Hi. I can use return FAILURE during PHP_MINIT_FUNCTION to stop a module from loading and the appropriate message is displayed ... PHP Warning: PHP Startup: Unable to load dynamic library 'xxxxxx' - The specified module could not be found. in Unknown on line 0 I want to restrict the module to only operate within the CLI SAPI. Using config.w32, I've limited the module to windows only. I can test the sapi ... if (strcmp(sapi_module.name, "cli") != 0) { return FAILURE; } But I'd like to explain why the module cannot be loaded. I've tried using zend_error() and php_error_docref() but I guess the system isn't ready yet for these errors. How do I generate an error (warning level I suppose), that will be logged in the error log file. Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY