📄 02-requirements.sgml
字号:
<!-- $Id: 02-requirements.sgml,v 1.1.1.1 2000/04/17 16:39:59 kk Exp $ --><sect1>Requirements and things to check for<sect2>Interpreter requirements<p>The PHP base library requires a working web server with CGIcapability and the CGI version of PHP 3.0.12 or higherinstalled. Alternatively mod_php can be used. Lowerversions of PHP do not work at all: The session class uses the<tt/base64_encode()/ and <tt/base64_decode()/functions which are known to be buggy in lower versions (up to3.0.7) of the library. Also, the OOH Forms classes are usingconstructor syntax, which has been introduced into the PHPlanguage in 3.0.5 and later versions. An issue with the$PHP_SELF variable and CGI PHP has been resolved withversion 3.0.5 and later. Perl regular expression functions arebeing used in the <tt/Template/ class and these are not reallyavilable up to 3.0.12.<em/Note:/ If you are using CGI PHP, it <em/must/ have beencompiled with the <tt/--enable-force-cgi-redirect/ switch for$PHP_SELF to have the correct value.Basically, if PHP_SELF is the exact local part of your$URL, all is well. If it instead contains the modified URL with/your cgi-bin/php prefixed, you have a buggy version of CGI PHP.Either upgrade your version of PHP or replace all occurrences of$PHP_SELF with $PATH_INFO in PHPLIB.<em/Note:/ PHPLIB requires that you have <tt/track_vars/compiled in and enabled.<em/Note:/ PHPLIB does not require<tt/short_open_tag/ to be enabled. The libraryalways uses <tt><?php</tt> as the PHP command introducer.<em/Note:/ PHPLIB does not require<tt/magic_quotes_gpc/ to be enabled. The libraryalways uses <tt>addslashes()</tt> when necessary.<sect2>Database requirements <p>The PHP base library requires a database connection in thedefault setup for storage of session variables, but this can becircumvented by selection another storage container type atinstallation time. Currently, storage containers are availablefor SQL databases (the default), SQL databases with limitedstring length (ct_split_sql.inc), System V sharedmemory (requires a PHP interpreter with SYSVSHM and SYSVSEMsupport), LDAP servers (requires a PHP interpreter with LDAPsupport), flat files, and DBM files.Using SQL, currently MySQL is fully supported and PostgreSQL,mSQL, Sybase, Microsoft SQL Server, ODBC and Oracle have limitedsupport (the limitation is only relevant if you intend to accessmetadata information, i.e. table definitions and the like).Database interfaces are not difficult to write and you caneasily write your own interface.You need a database server connection with <tt/select/,<tt/insert/, <tt/update/ and <tt/delete/ privileges from yourCGI environment. You need <tt/create/ and <tt/drop/ privilegesfrom an administrative account outside your CGI environment aswell.PHPLIB core functionality requires two tables as part of yourapplication table name space: <tt/active_sessions/ (select,insert, update and delete privilege required for the applicationuser) and <tt/auth_user/ (select privilege required for theapplication user. insert, update and delete privilege requiredfor the application user if user management is to be done fromwithin the application).Extended functionality may require additional tables.<sect2>Name space requirements<p>PHPLIB tries to be as name space neutral as possible with itscore features. Is issues no HTML by default and it occupies onlyfew names in the global name space. These are the class namesfor the classes defined: <tt/DB_Sql/, <tt/DB_SAM/,<tt/CT_Sql/, <tt/Session/, <tt/Auth/, <tt/Perm/,<tt/User/. Additionally, the classnames <tt/DB_Example/,<tt/Example_CT_Sql/, <tt/Example_Session/,<tt/Example_Auth/,<tt/Example_Challenge_Auth/,<tt/Example_Perm/ and <tt/Example_User/ aredefined by the sample setup in <tt/local.inc/, but these namescan and shall be customized by the application developer. PHPLIBdefines the function names <tt/page_open()/,<tt/page_close/, <tt/sess_load()/ and<tt/sess_save()/ for the page management functions. Theglobal variable $_PHPLIB (a hash) is taken. Only if<tt/page_open()/ is being used, globals are defined bythe library by default, but one global for each "feature"requested in the <tt/page_open()/ statement is taken.These are at most <tt/$sess/, <tt/$user/, <tt/$auth/ and<tt/$perm/.Including extension functionality or HTML widgets may occupyadditional classnames, function names or variables in the globalname space.<sect2>Year 2000 compliance statement<p>PHPLIB uses date fields within the column <tt/changed/ in thetable <tt/active_sessions/ in your database. The<tt/changed/ field is used in garbage collection, that is, toclean out abandoned sessions. The date field is a 14 characterfield of the format <tt/YYYYMMDDhhmmss/, that is, the date fieldhas four digit years and will cope properly with the newmillennium.PHPLIB sets cookies in the client browser. These cookies bydefault have session lifetime, that is, they do not expire butare not written to disk. Date calculations are not involved.It is possible to have PHPLIB set cookies with a limitedlifetime by defining the $lifetime slot of the Session class.If this is done, it depends on the date handling of the clientbrowser and client operating system, if the result is Y2Kcompliant. There are known issues with longterm cookies and anybrowser on MS-DOS/Windows 3.11 systems.PHPLIB does some date arithmetic internally that involvesmktime() and date() functions of the PHP3 language and Unixtime_t data types. The signed 32 bit Unix time_tdata type counts seconds since 01-Jan-1970 Midnight GMT and willoverflow sometime in the year 2038.PHPLIB itself will function up to 2038 and longer, if the Unixtime_t is being extended in time. PHPLIB does not protectyou from date and Y2K issues in your PHPLIB application, thePHP3 interpreter, the server operating system oder serversoftware, the client browser, the client operating system orother parts of your installation.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -