Questions tagged [pdo]

PHP Data Objects (PDO) defines a lightweight and consistent interface for accessing databases.

PHP Data Objects (PDO) defines a lightweight and consistent interface for accessing databases.

Official manual

79 questions
39
votes
5 answers

How do I tell Apache which PHP to use?

I am running Apache2 on a Mac OS X (10.5). I just compiled PHP 5.2.8 and finally got pdo-mysql working (or so I think). This terminal command: php --version is showing 5.2.8 and I have the right modules installed. But, when I do a phpinfo(), Apache…
Sam McAfee
  • 543
  • 1
  • 5
  • 7
9
votes
4 answers

AWS RDS connection count

I am using AWS RDS with MySQL for a project and have a "large" instance. The documentation is clear on what this means as far as compute resources and RAM goes, but I can't find anything that documents how many open database connections that I can…
wmarbut
  • 301
  • 2
  • 4
  • 11
7
votes
3 answers

Php pdo_dblib - cannot find/unable to load freetds

Self-hosted box, RHEL 6 PHP 5.3.3 PDO installed freetds installed pdo_dblib - so far no luck installing My goal is to use PDO with sybase. Attempting to install pdo_dblib from the appropriate version php source code. I have tried a variety of…
MaxPowers
  • 171
  • 1
  • 3
7
votes
2 answers

PDO_MYSQL Installation on CentOs6

I have a new CentOS 6 server running PHP 5.3.2. The output of php -v shows Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so - /usr/lib64/php/modules/pdo_mysql.so cannot open shared object file I modified /etc/php.ini to include…
SidC
  • 369
  • 3
  • 9
  • 23
6
votes
4 answers

How can I install mysql PDO driver in Ubuntu 10.04 and PHP 5.3.2

I tried to install mysql PDO driver with this command: $ sudo pecl install pdo_mysql but I got the following error: WARNING: "pecl/PDO_MYSQL" is deprecated in favor of…
j2gl
  • 163
  • 1
  • 1
  • 6
5
votes
3 answers

PHP 7.2.8 PDO Fails to Connect to MySQL 8.0.12 (GA) in AWS EC2 LEMP Stack

I'm testing a new LEMP webserver built with Ubuntu Server 18.04 LTS, NGINX 1.14, PHP 7.2.8, and MySQL 8.0.12. It is an AWS EC2 instance using the official Canonical AMI. Web and PHP work as intended aside from database connection. But I cannot…
HumanJHawkins
  • 390
  • 1
  • 2
  • 11
5
votes
3 answers

How to get mysql.sock file, mistakenly deleted from "/mysql/tmp/"

I was stuck with a PDO Exception PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in lock_may_be_available() (line 167 of home/../includes/lock.inc). In order to resolve that I tried to…
GIRI
  • 151
  • 1
  • 1
  • 5
5
votes
2 answers

How enable pdo_mysql

I am trying to install SpaceBukkit. I was wondering how I enable pdo_mysql. When trying to setup the MySQL part I get this error: The "pdo_mysql" extension is NOT loaded in your `php.ini`! Make sure to load it before continuing! This is not a…
hvalner
  • 51
  • 1
  • 1
  • 2
5
votes
2 answers

Installing PDO_DBLIB for PHP

I'm trying to get PDO's to work with SQL Server and I'm completely lost. I found this : http://www.php.net/manual/en/ref.pdo-dblib.php http://pecl.php.net/package/PDO_DBLIB and told to try this: sudo apt-get install php5-mssql I downloaded the…
Will
  • 211
  • 1
  • 3
  • 8
4
votes
3 answers

Linux : Undefined symbol: php_pdo_register_driver in Unknown on line 0

When i add the extenstion extension=pdo_sqlsrv.so in php.ini file in linux server with PHP v7.0 it's giving following error undefined symbol: php_pdo_register_driver in Unknown on line 0 Please Help me. Thanks
Raheel Aslam
  • 141
  • 1
  • 3
4
votes
4 answers

How do I install the pdo_mysql driver on Red Hat Enterprise Linux 6.1?

I have a RHEL box running PHP 5.3.3, which was installed using the binary packages provided by yum. I have installed the php-pdo package: # yum info php-pdo Loaded plugins: product-id, rhnplugin, subscription-manager Updating Red Hat…
Will Martin
  • 2,381
  • 5
  • 18
  • 18
4
votes
3 answers

How do I get PHP 5.3 working on Red Hat Enterprise Linux, with PDO enabled? PHP53 was installed with yum

This problem is complicated, and I'm not an expert at all, so bear with me. My server admin team set me up with a standard RHEL box. It had PHP preinstalled, as well as apache. I am now trying to get Drupal 7 installed on the machine, which has…
Jason Rhodes
  • 143
  • 1
  • 1
  • 6
3
votes
3 answers

php pdo connection cannot be established, but mysql command line client can

situation as follows: php script on server a, run by user 'web' (nginx + php-fpm) should access mysql on server b via pdo library, but gets SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (4) server a centos 6.5, php 5.3;…
Andreas Wagner
  • 133
  • 1
  • 7
3
votes
1 answer

MySQL connections aborted - should I be worried?

I'm tuning MySQL on a webserver with Apache and mod_php for speed so I ran mysqltuner and here's the result: -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK]…
koubic
  • 131
  • 1
  • 1
  • 5
3
votes
2 answers

Why are these two PDO classes different (and how can I make them the same)?

I have a web-based PHP email client (Roundcube) that I installed on a UNIX server, and right off the bat it produced this error: Fatal error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /path/to/file.php on line 134 It's this line of…
Wesley Murch
  • 155
  • 2
  • 12
1
2 3 4 5 6