suchen
Heimphp教程php手册linux php pdo mysql 扩展

linux php pdo mysql 扩展

Jun 06, 2016 pm 08:09 PM
linuxmysqlpdophp扩展lokale Maschine

今天在本机部署了一个pdo项目,发现一些问题,真没想到pdo mysql,不容易装啊,哈哈,我说的不容易,是因为php5.3以前版本,yum源里面根本没有。部署后就报,Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'。 1,从网上下pdo_mysql的扩展 下载地址:ht

今天在本机部署了一个pdo项目,发现一些问题,真没想到pdo mysql,不容易装啊,哈哈,我说的不容易,是因为php5.3以前版本,yum源里面根本没有。部署后就报,Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'。

1,从网上下pdo_mysql的扩展

下载地址:http://pecl.php.net/package/PDO_MYSQL

具体安装请参考:phpize增加php模块

不建议用这种方式安装,看官网说明

Do not use this, as PDO has been moved into core (the php source) so this pecl extension is dead.
This old extension provided a MySQL driver for PDO.

pdo的模块已经封装到php的核心代码里面去了,编译安装的时候,激活就行了。

./configure --with-pdo-mysql --with-mysql-sock=/var/mysql/mysql.sock //mysql sock路径

2,yum安装pdo mysql

php我是用yum安装的,php版本是5.1的,当我安装pdo mysql的时候,报错

yum install php-pdo_mysql

报以下错误:php53-common conflicts with php-common

解决办法:把php-common卸载掉,装php53-common

yum remove php-common
yum install php53-common php53 php53-pdo php-pdo_mysql

重起一下php-cgi就可以了。

linux php pdo mysql 扩展 今天在本机部署了一个pdo项目,发现一些问题,真没想到pdo mysql,不容易装啊,哈哈,我说的不容易,是因为php5.3以前版本,yum源里面根本没有。部署后就报,Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'。 1,从网上下pdo_mysql的扩展 下载地址:http://pecl.php.net/package/PDO_MYSQL 具体安装请参考:phpize增加php模块 不建议用这种方式安装,看官网说明 Do not use this, as PDO has been moved into core (the php source) so this pecl extension is dead. This old extension provided a MySQL driver for PDO. pdo的模块已经封装到php的核心代码里面去了,编译安装的时候,激活就行了。 ./configure --with-pdo-mysql --with-mysql-sock=/var/mysql/mysql.sock //mysql sock路径 2,yum安装pdo mysql php我是用yum安装的,php版本是5.1的,当我安装pdo mysql的时候,报错 yum install php-pdo_mysql 报以下错误:php53-common conflicts with php-common 解决办法:把php-common卸载掉,装php53-common yum remove php-common yum install php53-common php53 php53-pdo php-pdo_mysql 重起一下php-cgi就可以了。linux php pdo mysql 扩展
Stellungnahme
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

AI Hentai Generator

AI Hentai Generator

Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Beste grafische Einstellungen
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: Wie man alles in Myrise freischaltet
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌

Heiße Werkzeuge

PHPStorm Mac-Version

PHPStorm Mac-Version

Das neueste (2018.2.1) professionelle, integrierte PHP-Entwicklungstool

Dreamweaver Mac

Dreamweaver Mac

Visuelle Webentwicklungstools

Senden Sie Studio 13.0.1

Senden Sie Studio 13.0.1

Leistungsstarke integrierte PHP-Entwicklungsumgebung

MantisBT

MantisBT

Mantis ist ein einfach zu implementierendes webbasiertes Tool zur Fehlerverfolgung, das die Fehlerverfolgung von Produkten unterstützen soll. Es erfordert PHP, MySQL und einen Webserver. Schauen Sie sich unsere Demo- und Hosting-Services an.

SublimeText3 chinesische Version

SublimeText3 chinesische Version

Chinesische Version, sehr einfach zu bedienen