ini autogeneration ( getPHP_INI_ENTRY.php )

From: Date: Tue, 29 Apr 2003 10:25:35 +0000
Subject: ini autogeneration ( getPHP_INI_ENTRY.php )
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969352952@lists.php.net to get a copy of this message
Hello! As we all know, there are three main places where ini settings exist, they are: a) {extension}/ini.xml b) chapters/config.xml c) master ini table (currently in ini_set docs) It's been a long time since these (c) have been generated, we need to rerun this soon. I believe the last run used the mk_ini_set_table.sh script while we now have genPHP_INI_ENTRY.php A few concerns exist: 1) Problems occur when ini values have commas in them (ex. url_rewriter.tags). This will require some regex tweaking. Other similar problems may also exist. Basically we all need to test this, and make sure all the test_ini.xml entries look good, and adjust the routine accordingly. 2) Some values are CONSTANTS internal to PHP which are not available in our environment, so, we need to learn how to get their actual values. These are for default ini values. I created a list of said constants below*. Instead of hardcoding them into genPHP_INI_ENTRY.php we could scour the php sources although this doesn't appear to be a simple task, some are even defined in configure.in and not all are in php.ini-dist 3) Dealing with ini descriptions! This is for (a) and (b). The descriptions of course aren't autogenerated so I'm assuming we'll need to split up ini.xml and config.xml if we want to do this. Maybe someone has a bright idea for dealing with this. All in all we can pretty much perform (c) but the others require some thought (3). The script currently generates test_ini.xml for each extension, and a chapters/test_ini.xml for the rest. And chapters/config.master_test.xml for all. Regards and good night, Philip *Constants to replace in checkINI() as these come up in the table: if (in_array($val, array_keys($constants)) { $val = $constants[$val]; } $constants = array('DATE_DEFAULT_LATITUDE' => '31.7667', 'DATE_DEFAULT_LONGITUDE' => '35.2333', 'DATE_SUNRISE_ZENITH' => '90.83', 'DATE_SUNSET_ZENITH' => '90.83', 'DBA_DEFAULT' => '', 'DEFAULT_SENDMAIL_PATH' => '', 'DEFAULT_SHORT_OPEN_TAG' => 'On', 'HL_BG_COLOR' => '#FFFFFF', 'HL_COMMENT_COLOR' => '#FF9900', 'HL_DEFAULT_COLOR' => '#0000BB', 'HL_HTML_COLOR' => '#000000', 'HL_KEYWORD_COLOR' => '#007700', 'HL_STRING_COLOR' => '#DD0000', 'ICONV_INPUT_ENCODING' => 'ISO-8859-1', 'ICONV_INTERNAL_ENCODING' => 'ISO-8859-1', 'ICONV_OUTPUT_ENCODING' => 'ISO-8859-1', 'PHP_EXTENSION_DIR' => './', 'PHP_INCLUDE_PATH' => '.:/php/includes', 'PHP_MIME_MAGIC_FILE_PATH' => 'magic.mime', 'SAPI_DEFAULT_CHARSET' => 'iso-8859-1', 'SAPI_DEFAULT_MIMETYPE' => 'text/html', 'SAFE_MODE_ALLOWED_ENV_VARS' => 'PHP_', 'SAFE_MODE_PROTECTED_ENV_VARS' => 'LD_LIBRARY_PATH' );

« previous php.doc (#969352952) next »