1 Install and upgrade
1.1 System Requirements
1.2 Source Code Installation
1.3 One-Click Installation for Windows
1.4 Zsite, ZenTao and Zdoo
1.5 Install Zsite with online scripts
1.6 Upgrade Zsite
1.7 Upgrade Zsite with online scripts
1.8 Zsite Themes
1.9 Chosose decrytion software
2 About Zsite
2.1 About Zsite
2.2 Marketing in the era of mobile internet
2.3 Zsite License
2.4 Zsite and ZenTao
3 How to use Zsite
3.1 Content
3.1.1 Article Article Category Publish an Article Edit, Delete and Attach
3.1.2 Page Zsite Page
3.1.3 Blog Zsite blog
3.1.4 Book Add a book Add chapters to a book Write articles for a chapter Book settings
3.1.5 Submission Submit an article
3.2 Mall
3.2.1 Orders and Settings
3.2.2 Product Product category Add a product: basic info Add a product: attributions Add a product: images
3.3 User
3.3.1 User Management User list
3.3.2 Comment Review and reply a comment
3.3.3 Forum Board settings Board moderator and descriptions Edit, delete, reply and stick a thread
3.4 SEO
3.4.1 Traffic Statistics
3.4.2 Keywords
3.4.3 Links
3.5 UI
3.5.1 Interface Theme Layout Appearance Code Source Mobile site
3.5.2 Logo Site logo Site favicon
3.5.3 Slides
3.5.4 Navigation
3.5.5 Widget Manage a widget Example: customized widget Example: use Widget to set the style
3.5.6 Visual Editor
3.5.7 Other Settings
3.5.8 Custom Themes
3.6 Ext
3.6.1 Extensions and Themes
3.6.2 Import JS
3.7 Set
3.7.1 Site Basic settings Language Path Domain settings CND settings Cache settings Homepage menu Full text retrieval Backup/Restore Agreement Static Settings
3.7.2 Company Company Information Contact
3.7.3 Points
3.7.4 API Email Setting OAuth GitHub Facebook
3.7.5 Security Basic settings Filters and Blacklist/Whitelist Sensitive words and attachment Verification Code Admin and Privileges
4 System Maintenance
4.1 Configure web server for URL
4.2 Backup Zsite
4.3 Install Zend Guard Loader
4.4 Install Ioncube
4.5 Install other PHP extensions
4.5.1 Install PHP-openssl
4.5.2 Install PHP-curl
4.5.3 Install PHP-json
4.5.4 Install PHP-mbstring
4.5.5 Install PHP-gd
4.5.6 Install PDO
5 Customization
5.1 Before you start
5.2 Zsite source code
5.3 Zsite directory structure
5.4 Find the code to modify
5.5 Database structure
6 Zsite Cloud
6.1 Zsite License
6.2 Zsite versions
6.3 Resolve domain name to Zsite server
6.4 Why my site is locked?
6.5 How to backup my Zsite data?

Install PDO

2018-07-31 09:32:21
Last edited by Jon on 2018-08-10 15:44:26

PHP data object PDO extension defines a lightweight and consistent interface to access to the PHP database. PDO provides an abstract layer for data, which means that no matter no matter what database you use, you can query and retrieve data using the same functions (methods).


1. CentOS


Websever:Centos6.5 (virtual machine demo)

PHP package :/data/php-5.6.14/
PHP installation:/usr/local/php/
mysql installation:/usr/local/mysql/


Use phpinfo() to check whether the webserver has PDO installed. If no PDO is found, follow the steps below to install.

Find your PHP installation package(e.g. in the directory of /data/PHP-5.6.14/), and go to the directory of pdo_mysql. Execute

(/usr/local/php/ is the directory where I installed my PHP. Set your path according to your situation.)

After executing the command above, a file is added to the directory of pdo_msyql.

Execute the command below

./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql/
--with-php-config=/usr/local/php/bin/php-config  is the configuration of installing PHP
--with-pdo-MySQL=/usr/local/mysql/  is to designate the installation directory for MySQL
(Set the installation directories of PHP and msyql according to your environment.)

Compile and install

make && make install

After executing the command and it will be like the screenshot shown below,

The directory in the last line of the screenshot will be user later. pdo_mysql.so is in that directory shown below.

Alter the configuration file of PHP, php.ini and add the code belwo to it.


Save, quit, and restart. Run phpinfo() to check whether PDO is installed. If it is as shown below, it means that PDO is installed.

2. Ubuntu系统

If you do not install PHP and MySQL development kit, you need to install it before you start.

sudo apt-get install php5-dev
sudo apt-get install php5-pear
sudo apt-get install libmysqlclient15-dev

Run pecl to install it
sudo pecl install pdo

Add extension=pdo.so to PHP configuration file.

Install pdo_mysql

sudo pecl install pdo_mysql
sudo apt-get install php5-mysql

Add extension=pdo.so to PHP configuration file.

Restart it.


Alter php.ini and remove ";"

extension_dir="" // Set your own directory of ext

Add the directory of PHP installation to  the system variable PATH.

Restart it.

Write a Comment
Comment will be posted once reviewed.