In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the configuration method of PHP and PDO". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the configuration method of PHP and PDO".
1 DM PHP and PDO configuration method 1.1 hardware and software environment
Category
Version
Installation path
Operating system
Windows 10 Enterprise Edition (64 bit)
/
Apache
Apache/2.4.18 (32 bit)
D:\ AppServ\ Apache24
PHP
PHP 5.6.17 (32 bit)
D:\ AppServ\ php5
Dm7
V7.6.0.153-Build (2019.04.16-105603) ENT (32 bit)
D:\ dmdbms
View the Apache version
C:\ Users\ Administrator > httpd-v
Server version: Apache/2.4.18 (Win32)
Server built: Dec 9 2015 11:12:24
View the php version
D:\ > cd D:\ AppServ\ php5
D:\ AppServ\ php5 > php.exe-v
PHP 5.6.17 (cli) (built: Jan 6 2016 13:28:38)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
1.2 PHP connection to Dameng
1. Copy the database D:\ dmdbms\ drivers\ php_pdo\ php56ts_dm.dll to the D:\ AppServ\ php5\ ext directory.
two。 Add a dynamic expansion module to D:\ AppServ\ php5\ php.ini
Extension_dir = "D:/AppServ\ php5\ ext"-the specific path is based on the actual path.
Extension=php56ts_dm.dll
Note: a semicolon indicates that it is not enabled.
3. Add the DM default setting item in D:\ AppServ\ php5\ php.ini: (this step is optional)
[dm]
Whether persistent connections are allowed
Dm.allow_persistent = 1
The maximum number of persistent connections allowed.-1 is unlimited.
Dm.max_persistent = 3
The maximum number of connections allowed (including persistent connections).-1 is unlimited.
Dm.max_links = 3
; default host address
Dm.default_host = 127.0.0.1
; database logged in by default
Dm.default_db = DAMENG
; default connection user name
Dm.default_user = SYSDBA
Default connection password.
Dm.default_pw = SYSDBA
Connection timed out, this parameter is not actually used, waiting for the server to support
Dm.connect_timeout = 10
For various variable-length data types, including large fields, the maximum number of bytes read per column. If it is set to 0 or less than 0, a null value is displayed when the variable length field is read
Dm.defaultlrl = 4096
Whether to read binary type data, if it is set to 0, then binary will be replaced by null value
Dm.defaultbinmode = 1
Whether to allow checking the validity of persistent connections. If set to ON, then when a persistent connection is reused, it will check whether the connection is still valid
Dm.check_persistent = ON
The port number of the connection
Dm.port = 5236
4. Configure the D:\ AppServ\ Apache24\ conf\ httpd.conf file
Listen 80
ServerName LOCALHOST:80
DocumentRoot "D:/AppServ/www"
DirectoryIndex index.html index.htm index.php
LoadModule php5_module D:/AppServ/php5/php5apache2_4.dll
PHPIniDir "D:/AppServ/php5/"
5. Create a test.php file in the D:/AppServ/www directory and add the following
6. Configure system environment variables
PATH = D:\ dmdbms\ bin-- the database bin directory is based on the actual
7. Start database and Apache services
1.3 PDO connection to Dameng
Configuration process 1:
1. Add a dynamic expansion module to D:\ AppServ\ php5\ php.ini
Extension=D:\ dmdbms\ drivers\ php_pdo\ pdo56_dm.dll-- the specific path is based on the actual path
Note: a semicolon indicates that it is not enabled.
two。 Create a test.php file in the D:/AppServ/www directory and add the following
3. Execution result
D:\ > cd D:\ AppServ\ php5
D:\ AppServ\ php5 > set PATH=$PATH;D:\ dmdbms\ bin-- set the environment variable
D:\ AppServ\ php5 > php.exe D:\ AppServ\ www\ test.php
Connect success
Configuration process 2:
1. Add a dynamic expansion module to D:\ AppServ\ php5\ php.ini
Extension= D:\ dmdbms\ drivers\ php_pdo\ pdo56_dm.dll-the specific path is based on the actual path.
Note: a semicolon indicates that it is not enabled.
two。 Create a test.php file in the D:/AppServ/www directory and add the following
3. Configure system environment variables
PATH = D:\ dmdbms\ bin-- the database bin directory is based on the actual
4. Start database and Apache services
1.4 points for consideration
1. Both Apache and PHP are 32-bit, and the database version should also be 32-bit.
Thank you for reading, the above is the content of "the configuration method of PHP and PDO". After the study of this article, I believe you have a deeper understanding of the configuration method of PHP and PDO, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.