Re: Midgard-php4-1.6.3 Install Problem - preparser.c
Felix Natter <[email protected]>
| Newsgroups | gmane.comp.web.midgard.user |
|---|---|
| Message-ID | <[email protected]> |
"Adam Douglas" <[email protected]> writes: > Hi all. I'm trying to upgarde from Midgard 1.6.1 to Midgard 1.6.3. I > have PHP 4.3.11 using Apache1 on OpenBSD 3.5 (OS will be upgraded to 3.7 > soon as the CDs arrive). Everything was going great until I got to > Midagard-php4-1.6.3. I get the following error below. I've found some > discussion on this but I've not been able to find any solution. Any help > would be greatly appreciated. Thanks! > > > /usr/lib/apache/include/ap_config.h:1402: warning: `XtOffsetOf' > redefined > /usr/local/include/php/main/php.h:435: warning: this is the location of > the previous definition > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c: In > function `mgd_eval_string': > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:277: > syntax error before `*' > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:294: > `original_handle_op_arrays' undeclared (first use in this function) > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:294: > (Each undeclared identifier is reported only once > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:294: for > each function it appears in.) > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:324: > `original_active_op_array' undeclared (first use in this function) > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:325: > `original_function_state_ptr' undeclared (first use in this function) > /home/adouglas/Midgard_AllinOne/midgard-php4-1.6.3/preparser.c:329: > `retval' undeclared (first use in this function) > *** Error code 1 you are using a rather old compiler which cannot handle variable declarations in the middle of a block. So you need to move all variable declarations to the beginning of the function in mgd_eval_string (preparser.c). For example, the code: { TSRMLS_FETCH(); zend_op_array *original_active_op_array = EG(active_op_array); zend_function_state *original_function_state_ptr = EG(function_state_ptr); must be converted to: { zend_op_array *original_active_op_array; zend_function_state *original_function_state_ptr; TSRMLS_FETCH(); original_active_op_array = EG(active_op_array); original_function_state_ptr = EG(function_state_ptr); -- Felix Natter