diff options
author | Zeev Suraski <zeev@php.net> | 1999-06-08 19:37:40 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-06-08 19:37:40 +0000 |
commit | 230846f6ddd8d5dae629d10a9ea35bd26d44db8f (patch) | |
tree | 07240efc4b3aa2664e53b5c379a2c65c7f53adcf /Zend/zend_extensions.c | |
parent | 04b2c1d422690f25239e9af8ed41df31a158780f (diff) | |
download | php-git-230846f6ddd8d5dae629d10a9ea35bd26d44db8f.tar.gz |
Replace error messages
Diffstat (limited to 'Zend/zend_extensions.c')
-rw-r--r-- | Zend/zend_extensions.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index ea59c025d4..2518b439c6 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -45,19 +45,23 @@ int zend_load_extension(char *path) handle = DL_LOAD(path); if (!handle) { - zend_printf("Failed loading %s\n", path); +#ifndef WIN32||WINNT + fprintf(stderr, "Failed loading %s: %s\n", path, dlerror()); +#else + fprintf(stderr, "Failed loading %s\n", path); +#endif return FAILURE; } extension_version_info = (zend_extension_version_info *) DL_FETCH_SYMBOL(handle, "extension_version_info"); new_extension = (zend_extension *) DL_FETCH_SYMBOL(handle, "zend_extension_entry"); if (!extension_version_info || !new_extension) { - zend_printf("%s doesn't appear to be a valid Zend extension\n", path); + fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path); return FAILURE; } if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) { - zend_printf("%s requires Zend version %s or later\n" + fprintf(stderr, "%s requires Zend version %s or later\n" "Current version %s, API version %d\n", new_extension->name, extension_version_info->required_zend_version, @@ -67,7 +71,7 @@ int zend_load_extension(char *path) return FAILURE; } else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) { /* we may be able to allow for downwards compatability in some harmless cases. */ - zend_printf("%s is outdated (API version %d, current version %d)\n" + fprintf(stderr, "%s is outdated (API version %d, current version %d)\n" "Contact %s at %s for a later version of this module.\n", new_extension->name, extension_version_info->zend_extension_api_no, @@ -77,14 +81,14 @@ int zend_load_extension(char *path) DL_UNLOAD(handle); return FAILURE; } else if (ZTS_V!=extension_version_info->thread_safe) { - zend_printf("Cannot load %s - it %s thread safe, whereas Zend %s\n", + fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n", new_extension->name, (extension_version_info->thread_safe?"is":"isn't"), (ZTS_V?"is":"isn't")); DL_UNLOAD(handle); return FAILURE; } else if (ZEND_DEBUG_V!=extension_version_info->debug) { - zend_printf("Cannot load %s - it %s debug information, whereas Zend %s\n", + fprintf(stderr, "Cannot load %s - it %s debug information, whereas Zend %s\n", new_extension->name, (extension_version_info->debug?"contains":"does not contain"), (ZEND_DEBUG_V?"does":"does not")); @@ -103,12 +107,12 @@ int zend_load_extension(char *path) zend_llist_add_element(&zend_extensions, &extension); - /*zend_printf("Loaded %s, version %s\n", extension.name, extension.version);*/ + /*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/ zend_append_version_info(&extension); return SUCCESS; #else - zend_printf("Extensions are not supported on this platform.\n"); + fprintf(stderr, "Extensions are not supported on this platform.\n"); return FAILURE #endif } |