@@ -51,14 +51,12 @@ typedef struct {
5151 char status ;
5252} php_dir_entry ;
5353
54- static const char * real_value_hnd (cmd_parms * cmd , void * dummy ,
55- const char * name , const char * value , int status )
54+ static const char * real_value_hnd (cmd_parms * cmd , void * dummy , const char * name , const char * value , int status )
5655{
5756 php_conf_rec * d = dummy ;
5857 php_dir_entry e ;
5958
60- phpapdebug ((stderr , "Getting %s=%s for %p (%d)\n" , name , value , dummy ,
61- zend_hash_num_elements (& d -> config )));
59+ phpapdebug ((stderr , "Getting %s=%s for %p (%d)\n" , name , value , dummy , zend_hash_num_elements (& d -> config )));
6260
6361 if (!strncasecmp (value , "none" , sizeof ("none" ))) {
6462 value = "" ;
@@ -68,25 +66,21 @@ static const char *real_value_hnd(cmd_parms *cmd, void *dummy,
6866 e .value_len = strlen (value );
6967 e .status = status ;
7068
71- zend_hash_update (& d -> config , (char * ) name , strlen (name ) + 1 , & e ,
72- sizeof (e ), NULL );
69+ zend_hash_update (& d -> config , (char * ) name , strlen (name ) + 1 , & e , sizeof (e ), NULL );
7370 return NULL ;
7471}
7572
76- static const char * php_apache_value_handler (cmd_parms * cmd , void * dummy ,
77- const char * name , const char * value )
73+ static const char * php_apache_value_handler (cmd_parms * cmd , void * dummy , const char * name , const char * value )
7874{
7975 return real_value_hnd (cmd , dummy , name , value , PHP_INI_PERDIR );
8076}
8177
82- static const char * php_apache_admin_value_handler (cmd_parms * cmd , void * dummy ,
83- const char * name , const char * value )
78+ static const char * php_apache_admin_value_handler (cmd_parms * cmd , void * dummy , const char * name , const char * value )
8479{
8580 return real_value_hnd (cmd , dummy , name , value , PHP_INI_SYSTEM );
8681}
8782
88- static const char * real_flag_hnd (cmd_parms * cmd , void * dummy , const char * arg1 ,
89- const char * arg2 , int status )
83+ static const char * real_flag_hnd (cmd_parms * cmd , void * dummy , const char * arg1 , const char * arg2 , int status )
9084{
9185 char bool_val [2 ];
9286
@@ -100,24 +94,20 @@ static const char *real_flag_hnd(cmd_parms *cmd, void *dummy, const char *arg1,
10094 return real_value_hnd (cmd , dummy , arg1 , bool_val , status );
10195}
10296
103- static const char * php_apache_flag_handler (cmd_parms * cmd , void * dummy ,
104- const char * name , const char * value )
97+ static const char * php_apache_flag_handler (cmd_parms * cmd , void * dummy , const char * name , const char * value )
10598{
10699 return real_flag_hnd (cmd , dummy , name , value , PHP_INI_PERDIR );
107100}
108101
109- static const char * php_apache_admin_flag_handler (cmd_parms * cmd , void * dummy ,
110- const char * name , const char * value )
102+ static const char * php_apache_admin_flag_handler (cmd_parms * cmd , void * dummy , const char * name , const char * value )
111103{
112104 return real_flag_hnd (cmd , dummy , name , value , PHP_INI_SYSTEM );
113105}
114106
115- static const char * php_apache_phpini_set (cmd_parms * cmd , void * mconfig ,
116- const char * arg )
107+ static const char * php_apache_phpini_set (cmd_parms * cmd , void * mconfig , const char * arg )
117108{
118109 if (apache2_php_ini_path_override ) {
119- return "Only first PHPINIDir directive honored per configuration tree "
120- "- subsequent ones ignored" ;
110+ return "Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored" ;
121111 }
122112 apache2_php_ini_path_override = ap_server_root_relative (cmd -> pool , arg );
123113 return NULL ;
@@ -144,8 +134,7 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
144134 if (pe -> status >= data -> status ) continue ;
145135 }
146136 zend_hash_update (& e -> config , str , str_len , data , sizeof (* data ), NULL );
147- phpapdebug ((stderr , "ADDING/OVERWRITING %s (%d vs. %d)\n" , str ,
148- data -> status , pe ?pe -> status :-1 ));
137+ phpapdebug ((stderr , "ADDING/OVERWRITING %s (%d vs. %d)\n" , str , data -> status , pe ?pe -> status :-1 ));
149138 }
150139 return new_conf ;
151140}
@@ -175,26 +164,20 @@ void apply_config(void *dummy)
175164 zend_hash_move_forward (& d -> config )) {
176165 zend_hash_get_current_data (& d -> config , (void * * ) & data );
177166 phpapdebug ((stderr , "APPLYING (%s)(%s)\n" , str , data -> value ));
178- if (zend_alter_ini_entry (str , str_len , data -> value , data -> value_len ,
179- data -> status , PHP_INI_STAGE_RUNTIME ) == FAILURE ) {
167+ if (zend_alter_ini_entry (str , str_len , data -> value , data -> value_len , data -> status , PHP_INI_STAGE_RUNTIME ) == FAILURE ) {
180168 phpapdebug ((stderr , "..FAILED\n" ));
181169 }
182170 }
183171}
184172
185173const command_rec php_dir_cmds [] =
186174{
187- AP_INIT_TAKE2 ("php_value" , php_apache_value_handler , NULL , OR_OPTIONS ,
188- "PHP Value Modifier" ),
189- AP_INIT_TAKE2 ("php_flag" , php_apache_flag_handler , NULL , OR_OPTIONS ,
190- "PHP Flag Modifier" ),
191- AP_INIT_TAKE2 ("php_admin_value" , php_apache_admin_value_handler , NULL ,
192- ACCESS_CONF |RSRC_CONF , "PHP Value Modifier (Admin)" ),
193- AP_INIT_TAKE2 ("php_admin_flag" , php_apache_admin_flag_handler , NULL ,
194- ACCESS_CONF |RSRC_CONF , "PHP Flag Modifier (Admin)" ),
195- AP_INIT_TAKE1 ("PHPINIDir" , php_apache_phpini_set , NULL , RSRC_CONF ,
196- "Directory containing the php.ini file" ),
197- {NULL }
175+ AP_INIT_TAKE2 ("php_value" , php_apache_value_handler , NULL , OR_OPTIONS , "PHP Value Modifier" ),
176+ AP_INIT_TAKE2 ("php_flag" , php_apache_flag_handler , NULL , OR_OPTIONS , "PHP Flag Modifier" ),
177+ AP_INIT_TAKE2 ("php_admin_value" , php_apache_admin_value_handler , NULL , ACCESS_CONF |RSRC_CONF , "PHP Value Modifier (Admin)" ),
178+ AP_INIT_TAKE2 ("php_admin_flag" , php_apache_admin_flag_handler , NULL , ACCESS_CONF |RSRC_CONF , "PHP Flag Modifier (Admin)" ),
179+ AP_INIT_TAKE1 ("PHPINIDir" , php_apache_phpini_set , NULL , RSRC_CONF , "Directory containing the php.ini file" ),
180+ {NULL }
198181};
199182
200183static apr_status_t destroy_php_config (void * data )
@@ -209,8 +192,7 @@ static apr_status_t destroy_php_config(void *data)
209192
210193void * create_php_config (apr_pool_t * p , char * dummy )
211194{
212- php_conf_rec * newx =
213- (php_conf_rec * ) apr_pcalloc (p , sizeof (* newx ));
195+ php_conf_rec * newx = (php_conf_rec * ) apr_pcalloc (p , sizeof (* newx ));
214196
215197 phpapdebug ((stderr , "Creating new config (%p) for %s\n" , newx , dummy ));
216198 zend_hash_init (& newx -> config , 0 , NULL , NULL , 1 );
0 commit comments