Author: anthm Date: Thu Sep 7 16:26:35 2006 New Revision: 2559 Modified: freeswitch/trunk/src/mod/languages/mod_php/Makefile freeswitch/trunk/src/mod/languages/mod_php/mod_php.c Log: it builds but what else could it do? Modified: freeswitch/trunk/src/mod/languages/mod_php/Makefile ============================================================================== --- freeswitch/trunk/src/mod/languages/mod_php/Makefile (original) +++ freeswitch/trunk/src/mod/languages/mod_php/Makefile Thu Sep 7 16:26:35 2006 @@ -1,10 +1,11 @@ -CFLAGS += -I/usr/local/include/php/TSRM -I/usr/local/include/php/main/ -I/usr/local/include/php/Zend/ -I/usr/local/include/php/ +CFLAGS += -I$(PREFIX)/include/php/TSRM -I$(PREFIX)/include/php/main/ -I$(PREFIX)/include/php/Zend/ -I$(PREFIX)/include/php/ PHPMOD=freeswitch +LDFLAGS += -lphp4 all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PHPMOD).$(DYNAMIC_LIB_EXTEN) depends: - + MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install php-4.4.4.tar.gz --prefix=$(PREFIX) --enable-embed %.o: %.c $(CC) -fPIC $(CFLAGS) -c $< -o $@ Modified: freeswitch/trunk/src/mod/languages/mod_php/mod_php.c ============================================================================== --- freeswitch/trunk/src/mod/languages/mod_php/mod_php.c (original) +++ freeswitch/trunk/src/mod/languages/mod_php/mod_php.c Thu Sep 7 16:26:35 2006 @@ -226,7 +226,7 @@ Z_STRVAL_P(tmp) = (char *) estrndup(buffer, buffer_len); Z_STRLEN_P(tmp) = buffer_len; Z_TYPE_P(tmp) = IS_STRING; - zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(pval *), NULL); + zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), &tmp, sizeof(pval *), NULL); } efree(buffer); } @@ -339,7 +339,7 @@ /* connect my internal structure to the blank pointer passed to me */ *module_interface = &php_module_interface; - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hello World!\n"); + //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hello World!\n"); /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS;