Commit f981c69e30452123f79a68a58db90025c7d8a435
1 parent
e559b81e
Exists in
master
and in
7 other branches
Otimização do processo de carga das extensões do PHP
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
classesphp/carrega_ext.php
... | ... | @@ -56,10 +56,14 @@ else |
56 | 56 | $ler_extensoes = array(); |
57 | 57 | if (count($extensoes) > 0) |
58 | 58 | { |
59 | + $s = PHP_SHLIB_SUFFIX; | |
59 | 60 | foreach ($extensoes as $templ) |
60 | 61 | { |
61 | 62 | if (in_array( $templ, $temp1) != TRUE) |
62 | 63 | { |
64 | + @dl( 'php_'.$templ.".".$s ); | |
65 | + $ler_extensoes[] = $templ; | |
66 | + /* | |
63 | 67 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
64 | 68 | { |
65 | 69 | @dl('php_'.$templ.'.dll'); |
... | ... | @@ -70,11 +74,15 @@ if (count($extensoes) > 0) |
70 | 74 | @dl('php_'.$templ.'.so'); |
71 | 75 | $ler_extensoes[] = $templ; |
72 | 76 | } |
77 | + */ | |
73 | 78 | } |
74 | 79 | } |
75 | 80 | //verifica se carregou a gd se não, tenta carregar a gd2 |
76 | 81 | if (!function_exists('imagecreate')) |
77 | 82 | { |
83 | + @dl( 'php_gd.'.$s ); | |
84 | + $ler_extensoes[] = 'gd'; | |
85 | + /* | |
78 | 86 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
79 | 87 | { |
80 | 88 | @dl('php_gd.dll'); |
... | ... | @@ -85,9 +93,13 @@ if (count($extensoes) > 0) |
85 | 93 | @dl('php_gd.so'); |
86 | 94 | $ler_extensoes[] = 'gd'; |
87 | 95 | } |
96 | + */ | |
88 | 97 | } |
89 | 98 | if (!function_exists('imagecreate')) |
90 | 99 | { |
100 | + @dl( 'php_gd2.'.$s ); | |
101 | + $ler_extensoes[] = 'gd2'; | |
102 | + /* | |
91 | 103 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
92 | 104 | { |
93 | 105 | @dl('php_gd2.dll'); |
... | ... | @@ -98,10 +110,14 @@ if (count($extensoes) > 0) |
98 | 110 | @dl('php_gd2.so'); |
99 | 111 | $ler_extensoes[] = 'gd2'; |
100 | 112 | } |
113 | + */ | |
101 | 114 | } |
102 | 115 | //verifica se carregou o mapscript |
103 | 116 | if (!function_exists('ms_GetVersion')) |
104 | 117 | { |
118 | + @dl( 'php_mapscript.'.$s ); | |
119 | + $ler_extensoes[] = 'php_mapscript'; | |
120 | + /* | |
105 | 121 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
106 | 122 | { |
107 | 123 | if(!@dl('php_mapscript_48.dll')) |
... | ... | @@ -117,6 +133,7 @@ if (count($extensoes) > 0) |
117 | 133 | dl('php_mapscript.so'); |
118 | 134 | $ler_extensoes[] = 'mapscript'; |
119 | 135 | } |
136 | + */ | |
120 | 137 | } |
121 | 138 | } |
122 | 139 | if((is_array($ler_extensoes)) && (count($ler_extensoes) > 0)) | ... | ... |