From:             pkwan at advsofteng dot net
Operating system: 
PHP version:      5.3.0
PHP Bug Type:     Scripting Engine problem
Bug description:  dl is incorrect disabled instead of deprecated

Description:
------------
According to the PHP documentation, the "dl" function is deprecated, but
not disabled. So it should continue to work. The followings are the
supporting documentation as published in http://www.php.net/dl


- 5.3.0 This function now throws an E_DEPRECATED notice on all sapi's
except for CLI, CGI and Embed.  

- As of PHP 5, the dl() function is deprecated in every SAPI except CLI.
Use Extension Loading Directives method instead. 

- Since PHP 6 this function is disabled in all SAPIs, except CLI, CGI and
embed. 


The above means "dl" is disabled in some SAPI only starting from PHP 6.
Even in PHP 6, "dl" should continue to work in CLI, CGI and embed.

In PHP 5, "dl" is deprecated but not disabled. It should work in CLI, CGI,
Embed, and at most throws a E_DEPRECATED notice in other SAPI.


In practice, "dl" does not work in CGI, and no E_DEPRECATED notice is
throw in any case. After some trouble-shooting, the code that causes the
problem is (located in cgi_main.c):

if (!cgi && !fastcgi && !bindpath) {
   cgi_sapi_module.additional_functions = additional_functions;
}

The above disables the "dl" function in CGI usage, conflicting with the
documentation.




Reproduce code:
---------------
<?php dl("any_name.dll"); ?>


Expected result:
----------------
If the above code is executed in CGI, no error message is expected. 



Actual result:
--------------
Fatal error: Call to undefined function dl() in
C:\Inetpub\Scripts\phpinfo.php on line 1


-- 
Edit bug report at http://bugs.php.net/?id=48839&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48839&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48839&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48839&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48839&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48839&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48839&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48839&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48839&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48839&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48839&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48839&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48839&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48839&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48839&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48839&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48839&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48839&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48839&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48839&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48839&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48839&r=mysqlcfg

Reply via email to