|
1 | 1 | <?php
|
2 |
| -# Ensure that chars show in browser correctly. |
3 |
| -header('Content-Type: text/plain; charset=utf-8'); |
4 |
| - |
5 |
| -// The following modules, should exist in the build |
6 |
| -$modules = 'apache2handler,calendar,ctype,curl,date,dom,exif,fileinfo,filter,ftp,gd,gettext,hash,iconv,imagick,json,libxml,mbstring,mcrypt,mysqli,mysqlnd,openssl,pcre,pdo,pdo_mysql,phar,posix,readline,reflection,session,shmop,simplexml,sockets,spl,standard,sysvmsg,sysvsem,sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,opcache.enable,zip,zlib, mod_deflate, mod_filter'; |
7 |
| - |
8 |
| -$mods_check = array_map('trim', explode(",",$modules)); |
9 |
| - |
10 |
| -// Sort alphabetically. |
11 |
| -sort($mods_check); |
12 |
| - |
13 |
| -// Get regular (non-Zend) extensions. |
14 |
| -$apache_modules = apache_get_modules(); |
15 |
| -$mods = get_loaded_extensions(); |
16 |
| - |
17 |
| -// 'zend_extensions' param only introduced in PHP 5.2.4, |
18 |
| -// setting the param returns NULL in PHP 5.1. |
19 |
| -$zend_mods = get_loaded_extensions(true); |
20 |
| -if ($zend_mods) { |
21 |
| - $mods = array_merge($mods, $zend_mods); |
22 |
| -} |
23 |
| - |
24 |
| - |
25 |
| -if ($apache_modules) { |
26 |
| - $mods = array_merge($mods, $apache_modules); |
| 2 | +// DO NOT MODIFY THIS FILE IT IS CREATED EACH TIME THE INSTANCE IS STARTED |
| 3 | +if (getenv("NODE_ENVIRONMENT") == 'dev') { |
| 4 | + |
| 5 | + # Ensure that chars show in browser correctly. |
| 6 | + header('Content-Type: text/plain; charset=utf-8'); |
| 7 | + |
| 8 | + // The following modules, should exist in the build |
| 9 | + $modules = 'apache2handler,calendar,ctype,curl,date,dom,exif,fileinfo,filter,ftp,gd,gettext,hash,iconv,imagick,json,libxml,mbstring,mcrypt,mysqli,mysqlnd,openssl,pcre,pdo,pdo_mysql,phar,posix,readline,reflection,session,shmop,simplexml,sockets,spl,standard,sysvmsg,sysvsem,sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,opcache.enable,zip,zlib, mod_deflate, mod_filter'; |
| 10 | + |
| 11 | + $mods_check = array_map('trim', explode(",",$modules)); |
| 12 | + |
| 13 | + // Sort alphabetically. |
| 14 | + sort($mods_check); |
| 15 | + |
| 16 | + // Get regular (non-Zend) extensions. |
| 17 | + $apache_modules = apache_get_modules(); |
| 18 | + $mods = get_loaded_extensions(); |
| 19 | + |
| 20 | + // 'zend_extensions' param only introduced in PHP 5.2.4, |
| 21 | + // setting the param returns NULL in PHP 5.1. |
| 22 | + $zend_mods = get_loaded_extensions(true); |
| 23 | + if ($zend_mods) { |
| 24 | + $mods = array_merge($mods, $zend_mods); |
| 25 | + } |
| 26 | + |
| 27 | + |
| 28 | + if ($apache_modules) { |
| 29 | + $mods = array_merge($mods, $apache_modules); |
| 30 | + } |
| 31 | + |
| 32 | + $mods = array_map('strtolower', $mods); |
| 33 | + // Remove duplicates. |
| 34 | + $mods = array_unique($mods); |
| 35 | + print 'Enabled Module / Extensions: (✓ indicates required)' ."\n\n"; |
| 36 | + |
| 37 | + # |
| 38 | + # Output modules table. |
| 39 | + # |
| 40 | + foreach($mods as $mod) { |
| 41 | + # Search for Apache module, does it exist |
| 42 | + printf('%-18s', $mod); |
| 43 | + |
| 44 | + if(in_array($mod, $mods_check)) { |
| 45 | + echo '| ✓ '; |
| 46 | + } else { |
| 47 | + echo '| '; |
| 48 | + } |
| 49 | + echo "\n"; |
| 50 | + } |
| 51 | + |
| 52 | +} else { |
| 53 | + echo 'NODE_ENVIRONMENT: <strong>'. getenv("NODE_ENVIRONMENT") .'</strong>'; |
27 | 54 | }
|
28 | 55 |
|
29 |
| - |
30 |
| -$mods = array_map('strtolower', $mods); |
31 |
| - |
32 |
| - |
33 |
| -// Remove duplicates. |
34 |
| -$mods = array_unique($mods); |
35 |
| -print 'Enabled Module / Extensions: (✓ indicates required)' ."\n\n"; |
36 |
| - |
37 |
| - |
38 |
| -# |
39 |
| -# Output modules table. |
40 |
| -# |
41 |
| -foreach($mods as $mod) { |
42 |
| - # Search for Apache module, does it exist |
43 |
| - printf('%-18s', $mod); |
44 |
| - |
45 |
| - if(in_array($mod, $mods_check)) { |
46 |
| - echo '| ✓ '; |
47 |
| - } else { |
48 |
| - echo '| '; |
49 |
| - } |
50 |
| - echo "\n"; |
51 |
| -} |
| 56 | +echo '<br /><br /><a href="https://github.com/htmlgraphic/Apache">GitHub</a>'; |
0 commit comments