Back to index

php5  5.3.10
Functions
dl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PHPAPI int php_load_extension (char *filename, int type, int start_now TSRMLS_DC)
PHPAPI void php_dl (char *file, int type, zval *return_value, int start_now TSRMLS_DC)
PHPAPI PHP_FUNCTION (dl)
 PHP_MINFO_FUNCTION (dl)

Function Documentation

PHPAPI void php_dl ( char *  file,
int  type,
zval *  return_value,
int start_now  TSRMLS_DC 
)

Definition at line 281 of file dl.c.

{
       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", file);
       RETURN_FALSE;
}

Here is the caller graph for this function:

PHPAPI PHP_FUNCTION ( dl  )

Definition at line 54 of file dl.c.

{
       char *filename;
       int filename_len;

       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
              return;
       }

       if (!PG(enable_dl)) {
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded extensions aren't enabled");
              RETURN_FALSE;
       } else if (PG(safe_mode)) {
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded extensions aren't allowed when running in Safe Mode");
              RETURN_FALSE;
       }

       if (filename_len >= MAXPATHLEN) {
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "File name exceeds the maximum allowed length of %d characters", MAXPATHLEN);
              RETURN_FALSE;
       }

       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
       }

       php_dl(filename, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
       if (Z_LVAL_P(return_value) == 1) {
              EG(full_tables_cleanup) = 1;
       }
}

Here is the call graph for this function:

PHPAPI int php_load_extension ( char *  filename,
int  type,
int start_now  TSRMLS_DC 
)

Here is the caller graph for this function:

Definition at line 287 of file dl.c.

{
       PUTS("Dynamic Library support not available<br />.\n");
}