[Freeswitch-branches] [commit] r2612 - freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php

Freeswitch SVN docelmo at freeswitch.org
Sun Sep 10 06:20:54 EDT 2006


Author: docelmo
Date: Sun Sep 10 06:20:53 2006
New Revision: 2612

Modified:
   freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/mod_php.c

Log:
YAY

Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/mod_php.c
==============================================================================
--- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/mod_php.c	(original)
+++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/mod_php.c	Sun Sep 10 06:20:53 2006
@@ -64,13 +64,17 @@
 								  (sizeof(argv) / sizeof(argv[0])));
 	
 	sprintf(php_code, "$uuid=\"%s\"; include(\"%s\");\n", argv[0], argv[1]);
-	php_embed_init(argc, argv, &tsrm_ls);
-
-	//PHP_EMBED_START_BLOCK(argc, argv);
-	zend_eval_string(php_code, NULL, "Embedded code" TSRMLS_CC);
-	//PHP_EMBED_END_BLOCK();
-	php_embed_shutdown(tsrm_ls);
-
+	if (php_embed_init(argc, argv, &tsrm_ls) == SUCCESS){
+		//PHP_EMBED_START_BLOCK(argc, argv);
+		if (zend_eval_string(php_code, NULL, "Embedded code" TSRMLS_CC) == SUCCESS){
+		//PHP_EMBED_END_BLOCK();
+		php_embed_shutdown(tsrm_ls);
+		}else{
+		    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "There was a problem with the file");
+		}
+	}else{
+	    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "There was a problem with the file");	   
+	}
 
 
 }



More information about the Freeswitch-branches mailing list