Commit:    9587cf385e9c0220cbd999a13ed73ce5e496515b
Author:    Johannes Schlüter <johan...@php.net>         Wed, 3 Apr 2013 
10:59:37 +0200
Parents:   01ca2bf8c3f694c3637a161a5d68f3c947a22c08
Branches:  PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=9587cf385e9c0220cbd999a13ed73ce5e496515b

Log:
Improve warning when trying to load zend ext as PHP module

Changed paths:
  M  ext/standard/dl.c


Diff:
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index 1960e2c..ceb975e 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -171,6 +171,11 @@ PHPAPI int php_load_extension(char *filename, int type, 
int start_now TSRMLS_DC)
        }
 
        if (!get_module) {
+               if (DL_FETCH_SYMBOL(handle, "zend_extension_entry") || 
DL_FETCH_SYMBOL(handle, "_zend_extension_entry")) {
+                       DL_UNLOAD(handle);
+                       php_error_docref(NULL TSRMLS_CC, error_type, "Invalid 
library (appears to be a Zend Extension, try loading using zend_extension=%s 
from php.ini)", filename);
+                       return FAILURE;
+               }
                DL_UNLOAD(handle);
                php_error_docref(NULL TSRMLS_CC, error_type, "Invalid library 
(maybe not a PHP library) '%s'", filename);
                return FAILURE;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to