Doc #48819 [Asn->Csd]: dl function is undefined

From: Date: Fri, 11 Nov 2011 12:53:19 +0000
Subject: Doc #48819 [Asn->Csd]: dl function is undefined
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7413@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=48819&edit=1 ID: 48819 Updated by: aharvey@php.net Reported by: pkwan at advsofteng dot net Summary: dl function is undefined -Status: Assigned +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Multiple PHP Version: 5.3.0-5.3.3 Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2011-11-11 12:53:05] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=319049 Log: Fix doc bug #48819 (dl function is undefined) and also remove some extraneous apostrophes that crept in. ------------------------------------------------------------------------ [2011-11-11 03:34:05] ezyang@php.net Yeah, this is definitely either a documentation bug or a code bug. Have we just decided that dl() is too buggy to want to deal with? ------------------------------------------------------------------------ [2011-01-13 12:30:46] cipri@php.net For those still struggling with this problem, we reverted the patch as shown on http://www.mail-archive.com/php-cvs@lists.php.net/msg39628.html and the problem went away. IMHO this patch should be reversed, as it says "Disable dl() in CGI and FastCGI modes" while the website states "The only SAPI's that allow dl() are: [...] CGI" ------------------------------------------------------------------------ [2011-01-12 18:45:41] cipri@php.net We are currently experiencing the same problem on php-5.3.3. To confuse the matter even more: We use an Apache/2.2.14 (Debian) server with suexec enable. * When running the CGI-binary from the command line everything works fine, dl() is available and works as expected. * When running the CGI-binary through apache2's suexec command everything works. * The CLI binary also works without any problem. * Only when running php in CGI/FastCGI mode through Apache's suexec things stop working and php dies with the "Call to undefined function dl()", instead of the expected correct behaviour, or even throwing an error. ------------------------------------------------------------------------ [2010-08-16 17:13:17] cynic@php.net this bug is not bogus. it's either valid or should be reclassified as a documentation bug. the manual says (as of August 16, 2010): 5.3.0 dl() is now disabled in some SAPI's due to stability issues. The only SAPI's that allow dl() are: CLI, CGI and Embed. in fact, a peek at php-5.3.3/ext/standard/dl.c suggests that the manual is quite misleading as it leaves the reader thinking that dl() will work in non-TS versions of CLI, CGI and Embed just find, when in fact the function is E_DEPRECATED across the board: if ((strncmp(sapi_module.name, "cgi", 3) != 0) && (strcmp(sapi_module.name, "cli") != 0) && (strncmp(sapi_module.name, "embed", 5) != 0) ) { #ifdef ZTS php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in multithreaded Web servers - use extension=%s in your php.ini", filename); RETURN_FALSE; #else php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "dl() is deprecated - use extension=%s in your php.ini", filename); #endif } that's correct as long as i run php-cgi.exe on the command line: var_dump(extension_loaded('sqlsrv')); dl('php_sqlsrv.dll'); var_dump(extension_loaded('sqlsrv')); run with php-cgi -nq -d extension_dir=$somewhere -d error_reporting=-1 test.php gives bool(false) bool(true) however, running the same php-cgi inside Apache 2.2 on Windows, the dl() function does not exist. tested with 5.3.3-nts-vc9. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=48819 -- Edit this bug report at https://bugs.php.net/bug.php?id=48819&edit=1

« previous php.doc.bugs (#7413) next »