Setting ini_path after php_module_startup doesn't do much good -
since php_module_startup reads .ini.
# This fix is very ugly. Everyone is welcome to make better fix
# that won't report errors twice and won't scan argument 3 times
#endif /* FORCE_CGI_REDIRECT */
}
+ if (!cgi) {
+ while ((c=ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:"))!=-1) {
+ switch (c) {
+ case 'c':
+ php_ini_path = strdup(ap_php_optarg); /* intentional leak */
+ break;
+ }
+
+ }
+ ap_php_optind = orig_optind;
+ ap_php_optarg = orig_optarg;
+ }
+
if (php_module_startup(&sapi_module)==FAILURE) {
return FAILURE;
}
if (!cgi) {
while ((c=ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:"))!=-1) {
switch (c) {
- case 'c':
- php_ini_path = strdup(ap_php_optarg); /* intentional leak */
- break;
case '?':
no_headers = 1;
php_output_startup();