Index: /trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 508)
+++ /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 509)
@@ -327,4 +327,12 @@
 
 #define MAX_RETRIES 10
+
+#ifndef __APPLE__
+union semun {
+  int val;
+  struct semid_ds *buf;
+  ushort *array;
+};
+#endif
 
 int getKeyValue(maps* conf){
Index: /trunk/zoo-project/zoo-kernel/service_internal.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 508)
+++ /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 509)
@@ -61,5 +61,4 @@
 #include <xlocale.h>
 #endif
-#include <dirent.h>
 #include "ulinet.h"
 
Index: /trunk/zoo-project/zoo-kernel/service_internal_php.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_php.c	(revision 508)
+++ /trunk/zoo-project/zoo-kernel/service_internal_php.c	(revision 509)
@@ -25,10 +25,17 @@
 #include "service_internal_php.h"
 
+#include <sapi/embed/php_embed.h>
+#include <zend_stream.h>
+
 #ifdef ZTS
 void ***tsrm_ls;
 #endif
 
+zval *php_Array_from_maps(maps* t);
+zval*  php_Array_from_map(map*);
+maps* php_maps_from_Array(HashTable* t);
+map* php_map_from_HasTable(HashTable* t);
+
 int zoo_php_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){
-  fprintf(stderr,"STARING PHP SCRIPT\n");
   maps* m=*main_conf;
   maps* inputs=*real_inputs;
@@ -111,5 +118,5 @@
   tres=array_init(mapArray);
   while(tmp!=NULL){
-    map* sMap=getMapArray(tmp,"size",i);
+    map* sMap=getMapArray(tmp,"size",0);
     if(strncmp(tmp->name,"value",5)==0 && sMap!=NULL){
       tres=add_assoc_stringl(mapArray,tmp->name,tmp->value,atoi(sMap->value),1);
@@ -216,7 +223,7 @@
     INIT_PZVAL(&tmpcopy); 
     convert_to_string(&tmpcopy);
-    if(strncmp(key,"value")==0){
-      len=Z_STRLEN_P(varcopy);
-      addToMapWithSize(final_res,key,Z_STRVAL_P(tmpcopy),len);
+    if(strncmp(key,"value",5)==0){
+      len=Z_STRLEN_P(&tmpcopy);
+      addToMapWithSize(final_res,key,Z_STRVAL_P(&tmpcopy),len);
     }
     else{
@@ -231,5 +238,5 @@
 	fprintf(stderr,"%s => %s\n",key,Z_STRVAL(tmpcopy));
 #endif
-	addToMap(&final_res,key,Z_STRVAL(tmpcopy));
+	addToMap(final_res,key,Z_STRVAL(tmpcopy));
       }
     }
Index: /trunk/zoo-project/zoo-kernel/service_internal_php.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_php.h	(revision 508)
+++ /trunk/zoo-project/zoo-kernel/service_internal_php.h	(revision 509)
@@ -31,6 +31,4 @@
 #include "service_internal.h"
 #include <stdio.h>
-#include <sapi/embed/php_embed.h>
-#include <zend_stream.h>
 
 #ifdef __cplusplus
@@ -38,8 +36,4 @@
 #endif
 
-  zval *php_Array_from_maps(maps* t);
-  zval*  php_Array_from_map(map*);
-  maps* php_maps_from_Array(HashTable* t);
-  map* php_map_from_HasTable(HashTable* t);
   int zoo_php_support(maps**,map*,service*,maps**,maps**);
 
Index: /trunk/zoo-project/zoo-kernel/ulinet.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/ulinet.c	(revision 508)
+++ /trunk/zoo-project/zoo-kernel/ulinet.c	(revision 509)
@@ -59,5 +59,5 @@
 
 size_t header_write_data(void *buffer, size_t size, size_t nmemb, void *data){
-  if(strncmp("Set-Cookie: ",buffer,12)==0){
+  if(strncmp("Set-Cookie: ",(char*)buffer,12)==0){
     int i;
     char env[256];
@@ -71,11 +71,11 @@
 	;
 #endif
-    sscanf(buffer,"%s; path=%s; domain=%s",env,path,domain);
-    tmp=strcat(env,CCookie);
+    sscanf((char*)buffer,"%s; path=%s; domain=%s",env,path,domain);
+    tmp=strcat(env,CCookie[0]);
 #ifdef MSG_LAF_OUT
     printf("\n**Cookie env : [%s] , path : [%s], domain : [%s]**\n",env,path,domain);
     printf("buffer : %d (%s) (%s) (%s)\n",(buffer==NULL),buffer,tmp,CCookie);
 #endif
-    strcpy(CCookie,tmp);
+    strcpy(CCookie[0],tmp);
   }
   return size * nmemb;//write_data_into(buffer,size,nmemb,data,HEADER);
@@ -160,4 +160,5 @@
   fprintf( stderr, "setProxiesForProtocol (do nothing) ...\n" );
 #endif
+  return true;
 }
 #endif
@@ -301,4 +302,5 @@
     curl_easy_cleanup(hInternet->ihandle[i].handle);
   }
+  return 0;
 }
 
