@@ -404,17 +404,26 @@ static void log_message (const char *fmt, ...)
404
404
#define DEBUG_MESSAGE (fmt , ...)
405
405
#endif
406
406
407
+ static int lsapi_activate_user_ini (TSRMLS_D );
408
+
409
+ static int sapi_lsapi_activate (TSRMLS_D )
410
+ {
411
+ if (parse_user_ini && lsapi_activate_user_ini (TSRMLS_C ) == FAILURE ) {
412
+ return FAILURE ;
413
+ }
414
+ return SUCCESS ;
415
+ }
407
416
/* {{{ sapi_module_struct cgi_sapi_module
408
417
*/
409
418
static sapi_module_struct lsapi_sapi_module =
410
419
{
411
420
"litespeed" ,
412
- "LiteSpeed V6.10 " ,
421
+ "LiteSpeed V6.11 " ,
413
422
414
423
php_lsapi_startup , /* startup */
415
424
php_module_shutdown_wrapper , /* shutdown */
416
425
417
- NULL , /* activate */
426
+ sapi_lsapi_activate , /* activate */
418
427
sapi_lsapi_deactivate , /* deactivate */
419
428
420
429
sapi_lsapi_ub_write , /* unbuffered write */
@@ -547,8 +556,6 @@ static int lsapi_execute_script( zend_file_handle * file_handle)
547
556
548
557
}
549
558
550
- static int lsapi_activate_user_ini ();
551
-
552
559
static int lsapi_module_main (int show_source )
553
560
{
554
561
zend_file_handle file_handle = {0 };
@@ -557,10 +564,6 @@ static int lsapi_module_main(int show_source)
557
564
return -1 ;
558
565
}
559
566
560
- if (parse_user_ini && lsapi_activate_user_ini () == FAILURE ) {
561
- return -1 ;
562
- }
563
-
564
567
if (show_source ) {
565
568
zend_syntax_highlighter_ini syntax_highlighter_ini ;
566
569
@@ -584,11 +587,16 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va
584
587
zend_string * psKey ;
585
588
#endif
586
589
int type = ZEND_INI_PERDIR ;
590
+ int stage = PHP_INI_STAGE_RUNTIME ;
587
591
if ( '\001' == * pKey ) {
588
592
++ pKey ;
589
593
if ( * pKey == 4 ) {
590
594
type = ZEND_INI_SYSTEM ;
591
595
}
596
+ else
597
+ {
598
+ stage = PHP_INI_STAGE_HTACCESS ;
599
+ }
592
600
++ pKey ;
593
601
-- keyLen ;
594
602
if (( keyLen == 7 )&& ( strncasecmp ( pKey , "engine" , 6 )== 0 ))
@@ -603,12 +611,12 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va
603
611
psKey = zend_string_init (pKey , keyLen , 1 );
604
612
zend_alter_ini_entry_chars (psKey ,
605
613
(char * )pValue , valLen ,
606
- type , PHP_INI_STAGE_ACTIVATE );
614
+ type , stage );
607
615
zend_string_release (psKey );
608
616
#else
609
617
zend_alter_ini_entry ((char * )pKey , keyLen ,
610
618
(char * )pValue , valLen ,
611
- type , PHP_INI_STAGE_ACTIVATE );
619
+ type , stage );
612
620
#endif
613
621
}
614
622
}
0 commit comments