[PHP-DEV] Command line processing and php.ini loading

2001-05-18 Thread Oleg Sharoiko

Hello!

1. I made a patch to solve a minor problem: php.ini loading was done before
-c  command line options processing. You will find a patch bellow. I'd
like someone to review and commit if it's Ok.

2. Will I have problems if I enable command line options processing in CGI
mode. My php binary is installed outside of cgi-bin directory and is being run
with suexec wrapper? If not, then I will create a patch to add
configure option which will allow command line processing in cgi mode. Will
you argue?

Please CC: your replies to my e-mail ([EMAIL PROTECTED]), I will greatly appreciate
that.


--- php-4.0.5/sapi/cgi/cgi_main.c   Wed Mar  7 16:24:12 2001
+++ php-4.0.5.fix/sapi/cgi/cgi_main.c   Fri May 18 14:48:27 2001
@@ -413,10 +413,6 @@
setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be 
binary */
 #endif

-   if (php_module_startup(&cgi_sapi_module)==FAILURE) {
-   return FAILURE;
-   }
-
/* Make sure we detect we are a cgi - a bit redundancy here,
   but the default case is that we have to check only the first one. */
if (getenv("SERVER_SOFTWARE")
@@ -470,6 +466,10 @@
}
ap_php_optind = orig_optind;
ap_php_optarg = orig_optarg;
+   }
+
+   if (php_module_startup(&cgi_sapi_module)==FAILURE) {
+   return FAILURE;
    }

 #ifdef ZTS


-- 
Oleg Sharoiko.
Software and Network Engineer
Computer Center of Rostov State University.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Passing of sequences of structures from CORBA to PHP

2001-01-29 Thread Oleg Sharoiko

Hello!

I've found a bug in Satellite (CORBA access module for PHP) which prevent from
passing sequences of structures from CORBA servant objects to PHP. I made a
patch for satellite and it seems to be Ok now. (The patch is in the attached
file) I'd appreciate someone reviewing my patch and including it onto PHP
source tree.

-- 
Oleg Sharoiko.
Software and Network Engineer
Computer Center of Rostov State University.


--- php4/ext/satellite/namedvalue_to_zval.c Sat Sep  2 02:29:00 2000
+++ php-4.0.4pl1/ext/satellite/namedvalue_to_zval.c Fri Jan 26 11:00:30 2001
@@ -83,7 +83,7 @@
const CORBA_any * pSource, zval * pDestination)
 {
int i;
-   int length = 0;
+   int length = 0, step;
void ** pp_members = NULL;
zend_bool success = FALSE;
CORBA_NamedValue source_item;
@@ -121,13 +122,17 @@
array_init(pDestination);
 #endif
 
+   step = content_type->length ? content_type->length : 1;
+
for (i = 0; i < length; i++)
{
p_destination_item = NULL;
memset(&source_item, 0, sizeof(CORBA_NamedValue));
 
source_item.argument._type = content_type;
-   source_item.argument._value = &pp_members[i];
+   source_item.argument._value = pp_members;
+
+   pp_members += step;
 
ALLOC_ZVAL(p_destination_item);

@@ -236,6 +241,7 @@
}
}
 
+   return TRUE;
 
 error: 
return FALSE;
@@ -292,7 +298,7 @@
 
default:
 /* printf("unsupported corba TCKind %i\n", kind);*/
-/* php_error(E_WARNING, "unsupported corba TCKind %i", kind);*/
+   zend_error(E_WARNING, "(satellite) unsupported corba TCKind 
+%i", kind);
}
 
return success;
--- php4/ext/satellite/typecode.c   Sat Sep  2 02:29:00 2000
+++ php-4.0.4pl1/ext/satellite/typecode.c   Wed Jan 24 15:28:41 2001
@@ -132,8 +133,7 @@
 
if (type_code == NULL)
{
-/* printf("unknown type for member %s\n", 
-   IDL_IDENT(IDL_LIST(declaration).data).str);*/
+   zend_error(E_WARNING, "(Satellite) unknown type for member 
+%s", IDL_IDENT(IDL_LIST(declaration).data).str);
goto error;
}



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]