]> git.pld-linux.org Git - packages/php.git/blob - php-sapi-ini-file.patch
- added session-unregister patch to avoid httpd SEGVs with msession module
[packages/php.git] / php-sapi-ini-file.patch
1 --- php-4.3.0/main/php_ini.c.orig       Tue Nov 12 21:56:47 2002
2 +++ php-4.3.0/main/php_ini.c    Sat Jan  4 12:22:39 2003
3 @@ -351,6 +351,22 @@
4                                 }
5                         }
6                 }
7 +               /* Search (global) php.ini file in search path */
8 +               if (!fh.handle.fp) {
9 +                       fh.handle.fp = php_fopen_with_path("php.ini", "r", php_ini_search_path, &php_ini_opened_path TSRMLS_CC);
10 +                       if (fh.handle.fp) {
11 +                               fh.filename = php_ini_opened_path;
12 +                       }
13 +                       PG(safe_mode) = safe_mode_state;
14 +                       PG(open_basedir) = open_basedir;
15 +                       fh.type = ZEND_HANDLE_FP;
16 +                       zend_parse_ini_file(&fh, 1, php_config_ini_parser_cb, &extension_lists);
17 +                       safe_mode_state = PG(safe_mode);
18 +                       open_basedir = PG(open_basedir);
19 +                       PG(safe_mode) = 0;
20 +                       PG(open_basedir) = NULL;
21 +                       fh.handle.fp = NULL;
22 +               }
23                 /* Search php-%sapi-module-name%.ini file in search path */
24                 if (!fh.handle.fp) {
25                         const char *fmt = "php-%s.ini";
26 @@ -361,13 +377,6 @@
27                         if (fh.handle.fp) {
28                                 fh.filename = php_ini_opened_path;
29                         }
30 -               }
31 -               /* Search php.ini file in search path */
32 -               if (!fh.handle.fp) {
33 -                       fh.handle.fp = php_fopen_with_path("php.ini", "r", php_ini_search_path, &php_ini_opened_path TSRMLS_CC);
34 -                       if (fh.handle.fp) {
35 -                               fh.filename = php_ini_opened_path;
36 -                       }
37                 }
38         }
39         if (free_ini_search_path) {
This page took 0.030598 seconds and 3 git commands to generate.