diff --git a/src/mod/languages/mod_php/Makefile b/src/mod/languages/mod_php/Makefile index 38ed30ca48..b6607a4cc4 100644 --- a/src/mod/languages/mod_php/Makefile +++ b/src/mod/languages/mod_php/Makefile @@ -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 $@ diff --git a/src/mod/languages/mod_php/mod_php.c b/src/mod/languages/mod_php/mod_php.c index f5da69d94d..5e0f473d67 100644 --- a/src/mod/languages/mod_php/mod_php.c +++ b/src/mod/languages/mod_php/mod_php.c @@ -226,7 +226,7 @@ void freeswitch_error_handler(int type, const char *error_filename, const uint e 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 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod /* 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;