Installation and configuration of PHP in linxu

Source: Internet
Author: User
Example: -- with-custom-odbc/usr/local/odbc do not use the ODBC database driver syntax: -- disable-uniied-odbc description: using this option will disable all ODBC database drivers. This option does not need to specify a path, but the options affected by this option include -- with-iodbc, -- with-solid, -- with-ada example: -- with-custom-odbc =/usr/local/odbc

Do not use ODBC database drivers
Syntax: -- disable-uniied-odbc
Note: This option will disable all ODBC database drivers. This option does not need to specify a path, the options affected by this option include -- with-iodbc, -- with-solid, -- with-adabas, -- with-velocis, and -- with-custom-odbc.

LDAP directory protocol
Syntax: -- with-ldap = DIR
Note: to use the Directory Protocol (Lightweight Directory Access Protocol, LDAP), you must enable this option. For more information about LDAP, see RFC1777 and RFC1778 in the RFC file.
Example: -- with-ldap =/usr/local/ldap.

Mcrypt encoding function library
Syntax: -- with-mcrypt = DIR
Note: After installing the mcrypt function library, you can add this option when compiling PHP so that the program can use the codec function.
Example: -- with-mcrypt =/usr/local/include

Sys V signal
Syntax: -- enable-sysvsem
Note: to use the SysV signal (semaphores) mechanism, you must enable this option.

XML support
Syntax: -- with-xml
Note: enabling this option supports the XML parsing library written by James Clark's.

Maintenance Mode
Syntax: -- enable-maintainer-mode
Note: This option is generally not enabled unless it is useful for PHP developers.

Regular expression library
Syntax: -- with-system-regex
Note: If you need additional regular expression functions, you can add this option.

PHP configuration file
Syntax: -- with-config-file-path = DIR
Description: used to specify the php3.ini or php4.ini path for PHP initialization.
Example: -- with-config-file-path =/usr/local/lib

PHP execution path
Syntax: -- with-exec-dir = DIR
Note: For the sake of system security, you can specify the directory in which the PHP program must be executed.
Example: -- with-exec-dir =/usr/local/bin

Debugging Mode
Syntax: -- enable-debug
Note: This option is generally not used unless it is useful when developing a PHP program. It can display additional error messages.

Security mode
Syntax: -- enable-safe-mode
Note: The default value is enabled, which provides more protection for system security.

Variable tracking
Syntax: -- enable-track-vars
Note: PHP can track the three variables HTTP_GET_VARS, HTTP_POST_VARS, and HTTP_COOKIE_VARS, which are usually enabled.

Automatically add introduced characters
Syntax: -- enable-magic-quotes
Note: This feature allows the program to automatically add the introduced characters of the backslash during execution.

Open the debugger
Syntax: -- enable-debugger
Note: Open the built-in PHP debugger. At present, this function is still in the experimental stage and is not yet mature.

Cancel path (discard path)
Syntax: -- enable-discard-path
Note: With this option enabled, users cannot read. htaccess and other system security-related files through the browser.

High-precision mathematical functions
Syntax: -- enable-bcmath
Note: enable high-precision functions. You must first install this function library. this option is valid.

Force CGI redirection
Syntax: -- enable-force-cgi-redirect
Example: If you use cgi version mode to execute PHP settings, enabling this option will increase security. For example, if a user reads a http://my.host/cgi-bin/php/secret/doc.html, a hacker-level user who is familiar with the PHP system may enter the following URL http://my.host/secret/doc.html to read the relevant information. If PHP and Apache are compiled together to make PHP a part of Apache, you do not need to add this option.

Do not use short Tags
Syntax: -- disable-short-tags
Note: After this option is configured, PHP programs cannot use short ones. Mark, must be used Long mark.

Introduce remote file Ning
Syntax: -- enable-url-Des
Note: This option allows PHP programs to introduce (include) files on remote HTTP or FTP servers.

Disable syntax effect
Syntax: -- disable-syntax-hl
Note: Using this option will disable the color effect of PHP syntax.

Library path
Syntax: CPPFLAGS =-IDIR and LDFLAGS =-LDIR
Note: If PHP is safe or compiling the required function library in a worthwhile path, you need to add this option. LDFLAGS indicates the path of the function library and CPPFLAGS indicates the path of the header file.
Example: LDFLAGS =-L/my/lib/dir CPPFLAGS =-I/my/include/dir./configure


Php. ini configuration details


Php. ini or php3.ini is the configuration file that PHP reads at startup. The file is stored in/usr/local/lib /. In PHP 3.x, the configuration file is php3.ini, and in PHP 4.x, it is changed to php. ini. If PHP is installed as a server module, it will be read when the Web server is started and executed, and will not be read later. Therefore, you need to restart the Web server if you change the configuration. If you use an independent php cgi method, read it once every time.
You can use phpinfo () to view the current system configuration. The options are as follows:


Php_value name value
Configure the variable name and value. This option can be used only after PHP 4.x.

Php_flag name on | off
Configure the flag Boolean variable option. This option can be used only after PHP 4.x.

Php_admin_value name value
Configure Apache configuration file variables. The configuration in. htaccess is changed to this option. This option can be used only after PHP 4.x.

Php_admin_flag name on | off
Configure a Boolean variable as a flag. This option can be used only after PHP 4.x.

Asp_tags boolean
Configure whether the PHP program parses the tag with the ASP Script syntax <%> ). This option is available only after PHP 3.0.4. For more details, refer to the embedded method section.

Auto_append_file string
This option allows the specified file to be appended to the original PHP program for automatic execution. If the exit () function is used in the PHP program, the specified file will not be executed. The string parameter specifies the automatically executed file.

Auto_prepend_file string
This option allows the specified file to be automatically executed before the original PHP program. The string parameter specifies the automatically executed file.

Cgi_ext string
This option configures the CGI program extension.

Display_errors boolean
This option is used to configure whether to display the error message in the user's browser.

Doc_root string
Configure the server file and the root directory of the PHP file.

Engine boolean
This option uses PHP as the apache module. You can configure whether to use the PHP engine. You can add php3_engine on/off to httpd. conf to configure whether to use the PHP parser for a directory or virtual website.

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.