mysqlnd

mysqlnd_ms error - getaddrinfo failed, mysqlnd_global_stats in Unknown

本小妞迷上赌 提交于 2019-12-06 11:15:08
I'm trying to set up mysqlnd_ms so that it serves its purpose of doing the reads on the slave db and writes on the master db. However, I'm getting this error when httpd is restarted. PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqlnd_ms.so' - /usr/lib64/php/modules/mysqlnd_ms.so: undefined symbol: mysqlnd_global_stats in Unknown on line 0 I'm running an Amazon EC2 x64 AMI instance and ran the following commands on a fresh instance: sudo yum update sudo yum install -y gcc make gcc-c++ sudo yum install -y httpd24 php54 sudo yum install -y php54-devel php54

PHP PDO returning inconsistent results for SELECT FOUND_ROWS()

我是研究僧i 提交于 2019-12-06 10:49:58
问题 I have an issue with PHP/PDO and MySQL When I run a query with SQL_CALC_FOUND_ROWS and then select FOUND_ROWS(), 80% of the time its returning 0, and the rest of the time FOUND_ROWS is accurate I've reduced it to a simple test loop, but this works fine on my dev server, but in production the test case is having the inconsistency problem. Running the same queries from MySQL command line works correctly even in production, so it appears to be a PHP/PDO problem PHP 5.5.28 - using mysqlnd 5.0.11

get_result() Doesn't Work even mysqlnd is enabled

三世轮回 提交于 2019-12-05 21:31:02
It might be a duplication of many questions however i dont seem to get my answer from any of the questions present.I am using multi domain linux hosting provided by hostgator.I tried to use mysqli_stmt_get_result() but it throws me an error stating as an undefined method .I contacted the hostgator admin panel and they enabled the mysqlnd extension for me.I do see the mysqlnd extension enabled in phpinfo of my website.However i still see the same error. $mysqlnd = function_exists('mysqli_stmt_get_result'); if ($mysqlnd) { echo 'mysqlnd enabled!'; } else var_dump("nope"); I tried to check if it

How do I make sure that values from MySQL keep their type in PHP?

眉间皱痕 提交于 2019-12-05 08:24:13
I am having a problem in my PHP script where values called from MySQL are being returned as strings, despite being marked in the database as int and tinyint . This is a problem because when converting an array based on MySQL date into JSON data, values that should be integers are placed in double quotes, which is causing trouble in both Javascript and iPhone apps that use that JSON data. I am getting JSON values that look like "key" : "1" , when what I want is "key" : 1 . After doing some research, it seems that it should be possible to get the values as their native type so long as one has

centos7编译安装php7

别说谁变了你拦得住时间么 提交于 2019-12-04 08:39:21
安装依赖 [root@localhost ~]# yum -y install gcc gcc++ gcc-c++ wget make libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel bison autoconf libmcrypt libmcrypt-devel mhash mhash-devel mcrypt re2c 创建目录,现在php7.1.6 mkdir -p /usr/src/php7.1.6 cd /usr/src/php7.1.6 wget -c https://github.com/php/php-src/archive/php-7.1.6.tar.gz tar -xvf php-7.1.6.tar.gz 生成php源码目录下的配置文件 configure cd /usr/src/php7.1.6/php-src-php-7.1.6 ./buildconf --force 运行完以后文件结构如下: . ├── acinclude.m4 ├── aclocal.m4 ├── appveyor ├── autom4te.cache ├── build ├── buildconf ├── buildconf.bat ├──

mysqlnd 以及 libmysqlclient

半腔热情 提交于 2019-12-02 07:13:06
1. PHP拓展 1.1 PHP核心 PHP的核心是由两个独立的部分组成的。 在最底层是Zend Engine (ZE) 。ZE 负责把人类可以理解的脚本解析成机器可以理解的符号(token),然后在一个进程空间内执行这些符号。ZE还负责内存管理,变量作用域,以及函数调用的调度。 另一部分是PHP 。PHP负责与SAPI层(Server Application Programming Interface,经常被用来与Apache, IIS, CLI, CGI等host环境进行关联)的交互以及绑定。它也为safe mode和open basedir检查提供了一个统一的控制层,就像streams层把文件和网络I/O与用户空间函数(例如fopen(),fread()和fwrite())关联起来一样。 1.2 拓展形式 PEAR。PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR就是PHP的CPAN(Perl第三方代码库)。 PECL。PECL(PHP Extension Community Library),PHP的扩展库,它提供了一系列已知的扩展库,由C++等其他语言编写而成,以.so形式出现,.so 为共享库,是shared object

DB returns string instead of int (mysqlnd for PHP-7.1 / Laravel)

一笑奈何 提交于 2019-12-02 00:01:13
问题 A few days ago, I asked a question about a bug I found in Laravel. To fix it, I installed php5-mysqlnd on my server. Today, I upgraded my application to the latest php 7.1.*. Everything works correctly, except the bug is back again, i.e. integers in the database are returned as strings, which fails my strict comparison. I tried to find a package for mysqlnd for php 7.1 but there are none (yet?). But mysqlnd seems enabled though... phpinfo() PHP Version => 7.1.3-2+0~20170315222009.20+jessie~1

DB returns string instead of int (mysqlnd for PHP-7.1 / Laravel)

给你一囗甜甜゛ 提交于 2019-12-01 22:11:07
A few days ago, I asked a question about a bug I found in Laravel . To fix it, I installed php5-mysqlnd on my server. Today, I upgraded my application to the latest php 7.1.*. Everything works correctly, except the bug is back again, i.e. integers in the database are returned as strings, which fails my strict comparison. I tried to find a package for mysqlnd for php 7.1 but there are none (yet?). But mysqlnd seems enabled though... phpinfo() PHP Version => 7.1.3-2+0~20170315222009.20+jessie~1.gbpc7e7dd System => Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 mysqlnd

MySQL/PDO truncates the data

北战南征 提交于 2019-12-01 17:54:29
问题 $book is a 7kb string. If this query is executed using PHP PDO exec , the monograph column (LONGTEXT) data gets truncated at 6765 character: echo strlen($book); // output 7157 $db->exec("UPDATE `chemicals` SET `monograph` = {$db->quote($book)} WHERE `id` = {$db->quote($c['id'])};"); However, if I print the query and execute it using SQL client (bypassing PHP), it inserts all the data to the database. Which makes me think it is PHP setting that I am not yet familiar to. Note that the same is

what the different between MySQL Native Driver and MySQL Client Library

非 Y 不嫁゛ 提交于 2019-12-01 16:38:43
i want to know the different between MySQL Native Driver and MySQL Client Library and when to use both of them John There is no big difference in the PHP language level. libmysqlclient distributed by MySQL, mysqlnd distributed by PHP. libmysqlclient is part of MySQL, you need install MySQL library. Their license are different. mysqlnd supports a lot of plugins (mysqlnd_ms & mysqlnd_qc & ...). Because mysqlnd is part of PHP, its memory could be limited by PHP configuration. mysqlnd is the default after 5.4 http://php.net/manual/en/mysqlinfo.library.choosing.php mysql : dual licence optional