Changeset 972 in svn for trunk/xcache.c


Ignore:
Timestamp:
2012-07-14T04:58:47+02:00 (3 years ago)
Author:
Xuefer
Message:

closes #164: warning/error when xcache.so is loaded incorrectly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r971 r972  
    38253825    xc_module_gotup = 1;
    38263826    if (!xc_zend_extension_gotup) {
     3827        zend_error(E_WARNING, "XCache is designed to be loaded as zend_extension not extension");
    38273828        xc_zend_extension_register(&zend_extension_entry, 0);
    38283829        xc_zend_extension_startup(&zend_extension_entry);
     
    40404041static int xc_zend_startup_last(zend_extension *extension) /* {{{ */
    40414042{
     4043    zend_extension *ext = zend_get_extension(XCACHE_NAME);
     4044    if (ext) {
     4045        zend_error(E_WARNING, "Module '" XCACHE_NAME "' already loaded");
     4046    }
    40424047    /* restore */
    40434048    extension->startup = xc_last_ext_startup;
     
    40694074
    40704075        xc_llist_zend_extension = xc_llist_get_element_by_zend_extension(&zend_extensions, XCACHE_NAME);
     4076        if (xc_llist_zend_extension != zend_extensions.head) {
     4077            zend_error(E_WARNING, "XCache must be loaded as the first zend_extension for maximum compatibility");
     4078        }
     4079        /* hide myself */
    40714080        xc_llist_unlink(&zend_extensions, xc_llist_zend_extension);
    40724081
Note: See TracChangeset for help on using the changeset viewer.