A possible fix would be to change all occurences of E_ERROR to E_WARNING
in the dl() code. That way you can always do recovery of this�failure.
A patch is attached which I will commit if nobody objects (with a good
reason :).
Derick
On 13 Oct 2002 [EMAIL PROTECTED] wrote:
> From: [EMAIL PROTECTED]
> Operating system: NT4
> PHP version: 4.2.1
> PHP Bug Type: Scripting Engine problem
> Bug description: @dl() causes script to exit
>
> Ok, so dl() doesn't yet work on windows and that's fine, but it should
> still be possible to call dl() on that platform and have no ill effects
> when suppressed with @. However, whilst the resultant error message is
> suppressed, script execution terminates. Suppression of other errors from
> dl() on Unix works as expected.
>
> Sniper: the following script will reproduce the problem.
>
> <? @dl('bug'); echo 'gub'; ?>
>
> --
> Edit bug report at http://bugs.php.net/?id=19885&edit=1
> --
> Try a CVS snapshot: http://bugs.php.net/fix.php?id=19885&r=trysnapshot
> Fixed in CVS: http://bugs.php.net/fix.php?id=19885&r=fixedcvs
> Fixed in release: http://bugs.php.net/fix.php?id=19885&r=alreadyfixed
> Need backtrace: http://bugs.php.net/fix.php?id=19885&r=needtrace
> Try newer version: http://bugs.php.net/fix.php?id=19885&r=oldversion
> Not developer issue: http://bugs.php.net/fix.php?id=19885&r=support
> Expected behavior: http://bugs.php.net/fix.php?id=19885&r=notwrong
> Not enough info: http://bugs.php.net/fix.php?id=19885&r=notenoughinfo
> Submitted twice: http://bugs.php.net/fix.php?id=19885&r=submittedtwice
> register_globals: http://bugs.php.net/fix.php?id=19885&r=globals
> PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19885&r=php3
> Daylight Savings: http://bugs.php.net/fix.php?id=19885&r=dst
> IIS Stability: http://bugs.php.net/fix.php?id=19885&r=isapi
>
--
---------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
JDI Media Solutions http://www.jdimedia.nl/
---------------------------------------------------------------------------
Index: ext/standard/dl.c
===================================================================
RCS file: /repository/php4/ext/standard/dl.c,v
retrieving revision 1.73
diff -u -r1.73 dl.c
--- ext/standard/dl.c 5 Sep 2002 21:12:55 -0000 1.73
+++ ext/standard/dl.c 13 Oct 2002 10:36:51 -0000
@@ -66,7 +66,8 @@
#ifdef ZTS
if ((strcmp(sapi_module.name, "cgi")!=0) && (strcmp(sapi_module.name,
"cli")!=0)) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Not supported in
multithreaded Web servers - use extension statements in your php.ini");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in
+multithreaded Web servers - use extension statements in your php.ini");
+ RETURN_FALSE;
}
#endif
@@ -78,9 +79,9 @@
convert_to_string_ex(file);
if (!PG(enable_dl)) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Dynamically loaded
extentions aren't enabled");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded
+extentions aren't enabled");
} else if (PG(safe_mode)) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Dynamically loaded
extensions aren't allowed when running in Safe Mode");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded
+extensions aren't allowed when running in Safe Mode");
} else {
php_dl(*file, MODULE_TEMPORARY, return_value TSRMLS_CC);
EG(full_tables_cleanup) = 1;
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php