Displaying a loggable error during PHP_MINIT_FUNCTION and suppressing the loading of the module.

From: Date: Thu, 31 Mar 2011 10:41:14 +0000
Subject: Displaying a loggable error during PHP_MINIT_FUNCTION and suppressing the loading of the module.
Groups: php.internals 
Request: Send a blank email to internals+get-51762@lists.php.net to get a copy of this message
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

« previous php.internals (#51762) next »