PHP3 Chinese document continued 1

Source: Internet
Author: User
Tags dbase driver manager
Chapter 4 install this chapter will guide you through how to install and set PHP3. Introduce necessary knowledge and software. Basic UNIX skills (learn how to operate and "create" a C compiler) a standard ANSIC compiler a WEB server (apparently needed) through UNIX source code compilation and installation to download the latest SyntaxHighlighter source file. all ();

Chapter 4 install this chapter will guide you through how to install and set PHP3. Introduce necessary knowledge and software. Basic UNIX skills (learn how to operate and "make" a C compiler) a standard ansi c compiler a WEB server (apparently needed) download the latest source code of the source file by compiling and installing the UNIX source code at the following URL: http://www.php.net Quick installation instructions (Apache Module version) 1. gunzip apache_1.3.x.tar.gz 2. tar xvf apache_1.3.x.tar 3. gunzip php-3.0.x.tar.gz 4. tar xvf php-3.0.x.tar 5. cd apache_1.3.x 6 .. /configure -- prefix =/www 7. cd .. /php-3.0.x 8 .. /configure -- with-mysql -- with-apache = .. /apache_1.3.x -- enable-track-vars 9. make 10. make install 11. cd .. /apache_1.3.x 12 .. /configure -- prefix =/www -- activate-module = src/modules/php3/libphp3. A 13. make 14. make install Instead of this step you may prefer to simply copy the httpd binaryovertop of your existing binary. make sure you shut down yourserver first though. (You can also replace the preceding steps by directly copying the httpd binary file to overwrite the existing binary file. However, you must first disable your server .) 15. cd .. php-3.0.x 16. cp php3.ini-dist/usr/local/lib/php3.ini You can edit/usr/local/lib/php3.ini file to set PHP options. if you prefer this file in another location, use -- with-config-file =/path in step 8. (You can directly edit the/usr/local/lib/php3.ini file to set PHP options. if you store this file in another location, use with-config-file =/path in step 8) 17. edit your httpd. conf or srm. conf file and add: AddType application/x-httpd-php3. php3 You ca N choose any extension you wish here... php3 is simply the one we suggest. (you can choose any extension you want. we think PHP3 is very simple .) 18. use your normal procedure for starting the Apache server. (You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal .) (You must stop and restart the server, instead of simply using the RELOAD function of the server .) There are two ways to set PHP3 1. use the "setup" script language following PHP3. This script language will ask you a series of questions (most of them are similar to the PHP/FI 2.0 "install" script language) and run "configure" at the end ". To run this script, enter "./setup ". This script will also create a file called "do-conf", which will be uploaded to the data in the settings. You can edit this file to change some settings (only some) without re-running the setup program. Then, enter "./do-conf" to use these options. 2. manual operation settings. To view the setting options you can use, enter "./configure -- help ". Details of different settings are listed below. In Apache mode, PHP3 is created in Apache mode. for the question "Build as an Apache module ?" (Create in Apache mode ?) You should answer "yes" (yes) (set-with-apache = DIR) and describe the basic directory allocated by Apache in detail. If you have decompressed your Apache configuration package in "/usr/local/www/apache_1.2.4", this is the basic directory allocated by your Apache. The default directory is/usr/local/etc/httpd ". In fhttpd mode, PHP3 is created in fhttpd mode. The problem is "Build as an fhttpd module ?" Answer "yes" (set-with-fhttpd = DIR) and specify the source data directory in fhttpd mode. The default directory is "/usr/local/src/fhttpd". if you are running fhttpd, setting up PHP in this mode will provide better performance, better control and remote execution capabilities. The default setting of CGI version is to create PHP3 according to a CGI program. If you are running a WEB server, PHP3 supports this mode, you will choose this solution for performance reasons. However, the CGI version of PHP3 allows Apache users to run different pages using PHP3 under different user identities. Read the security section carefully if you are running PHP in CGI format. Database support options PHP provides built-in support for many databases (ODBC) Adabas D -- with-adabas = DIR when compiling the Adabas D database. This parameter is the installation directory of Adabas D. The default value is/usr/local/adabasd. DBase -- with-dbase activates the support of the built-in Dbase Database without the need for external libraries. FilePro activates built-in support for read-only filePro without external libraries. MSQL -- with-msql = DIR in order to activate mSQL support, the parameter of this option is the installation directory of mSQL, and the default value is/usr/local/Hughes. This is the default directory for mSQL 2.0 installation. Configure can automatically detect the mSQL version installed in the system. PHP3 supports versions 1.0 and 2.0. If you compile PHP3 and mSQL1.0 versions, you can only access the database in MySQL 1.0 and replace the scheduling algorithm. MySQL -- with-mysql = DIR in order to activate MySQL support, the parameter of this option is the installation directory of MySQL. the default value is/usr/local /. This is the default directory for MySQL installation. IODBC -- with-iodbc = DIR includes support for iODBC. This feature was initially designed and developed for the iODBC driver manager, which is a free and rereleased ODBC driver manager that can work in many UNIX systems. This parameter is the directory installed by iODBC. the default value is/usr/local. OpenLink ODBC -- with-openlink = DIR includes OpenLink ODBC support. The parameter of this option is the installation directory of OpenLink ODBC. the default value is/usr/local/openlink. Oracle -- with-oracle = DIR includes Oracle support. After testing, at least Oracle7.0 and 7.3 can work normally. This parameter is the ORACLE_HOME Directory. if your Oracle environment has been prepared, you do not need to specify this parameter. PostgreSQL -- with-pgsql = DIR includes support for PostgreSQL. This parameter is the reference directory for PostgreSQL Installation. the default value is/usr/local/pgsql. The support for other common databases is roughly the same as listed above. For more information, see the usage instructions for the selected database. Other preparation options-enable-sysvsem includes Sys V signal (supported by most Unix systems ). For more information, see the signal and shared memory documentation. -- Enable-sysvshm includes support for Sys V shared memory (supported by most Unix systems ). For more information, see the signal and shared memory documentation. -- With-xml includes support for an informal version of XML syntax, using James Clark's expat library. See the XML function guide for details. -- Enable-maintainer-mode opens additional related and compilation warning information, which is often used by PHP3 developers. -- With-system-regex: the library that uses the system regular expression is better than the bound library. If you compile PHP3 as a server component, you must use the same library when compiling and connecting to the server. If you need something in the system, open this option. if possible, we recommend that you use a database bundled with PHP3. -- With-config-file-path: This path is used to find the position of the php3.ini file when PHP3 is started. -- With-exec-dir can only be executed in the secure mode directory. the default value is/usr/local/bin /. This option can only be set as default. it can be implemented by modifying safe_mode_exec_dir in the preparation file. -- Disable-debug does not include debugging information in the library or execution. Debugging information helps you quickly identify the problem. Therefore, it is best to retain debugging information as long as PHP is still in alpha or beta testing. -- Enable-safe-mode the "safe_mode" option is enabled by default. this option imposes some restrictions on the PHP function. for example, you can only open files in the WEB root directory, read the security chapter for details. CGI users should always keep this option open. This option can only be set as default, but you can enable or disable this option by modifying the configuration file (php3.ini. -- Enable-track-vars uses PHP3 to save the request GWT/POST/cookie track from HTTP_GET_VARS, HTTP_POST_VARS, or HTTP_COOKIE_VARS. This option is set to the default value. you can also set the value of track_vars in the configuration file to change its attributes (enabled or disabled ). -- Enable-magic-quotes settings make magic reference the default value. This option only sets this default situation. it can be set to available or unavailable by specifying magic_quotes_runtime in configuration file. For more information, see magic_quotes_gpc and magic_quotes_sybase. -- Enable-debugger: activate the internal PHP3 debugger support. This feature is only in the experimental stage. See Debugger configuration in Configuration file. -- Enable-discard-path if this attribute is set to available, PHP's binary CGI can be safely protected outside The WED tree, at the same time, others cannot use some special means to obtain access permissions. Refer to section in the security chapter about this option. -- Enable-bcmath enables any precision mathematical functions in the BC style to be used. See configuration file options in configuration file. -- Enable-force-cgi-redirect: use security check to redirect internal servers. This feature is required if you need to run CGI programs on Apache. When PHP is used as CGI binary, as the default setting, PHP will first check whether it is used for redirection (for example, using activity indication on Apache ). This will confirm that PHP binary cannot be directly called to skip the standard WEB server authentication program, for example: http://my.host/cgi-bin/php/secret/doc.html . In this example http://my.host/secret/doc.html But no security settings for the directory/secret by HTTPD. Disable this check without using this option and use the bypass HTTPD security and identity settings at the same time. If you want to do this, unless your server software cannot point out a secure redirection, and files in your folder root directory and user directory will be accessed by anyone. See the security chapter for details about this option. -- Disable-short-tags disable short-term PHP3 tags . If you want to use XML (eXtended Markup Language), you must disable So, PHP code labels are left . This option can only be set to default. You can enable or disable this option by modifying the short open tag command in the configuration file. -- Enable-url-nodes through the include () function, PHP3 can directly run the code of other HTTP and FTP sites. See the include path option in the configuration file. -- Disable-syntax-hl disable the syntax highlighting function. CPPFLAGS and LDFL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.