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
1
vote
1 answer

MySQL server experiencing high stress/max connections

The Short: We're hitting max connections and seeing very poor performance from MySQL during peak business hours and cannot determine if it is a load problem or a configuration problem. The Long: To begin, here’s our server specs hosted on Digital…
Pete_1
  • 111
  • 3
1
vote
1 answer

Connecting to MSSQL db (PDO, FreeTDS, ODBC)

I have an Ubuntu 12.04 server and I'm trying to establish a connection to a MSSQL database. I've managed to connect using tsql and isql, but osql doesn't work and connecting with PHP using PDO also isn't working.. I will try to provide as much…
sudo
  • 11
  • 1
  • 1
  • 3
1
vote
1 answer

OpenShift: MySQL PDO 'connection refused', works locally

I have an API i want to deploy to OpenShift, everything works locally, but when trying to use it online i get some problems. When trying to connect to the database, using PDO, i get this error: Failed to connect to the database: SQLSTATE[HY000]…
jonathan
  • 111
  • 2
  • 5
1
vote
2 answers

SSL Support for PHP 5.3.3 and Apache

After a solid day investigating why I can't get my application to connect to a remote server over SSL using PHP PDO, I found PDO::MYSQL_ATTR_SSL..., but it seems that they exists only for 5.3.7 or above. My Question is this. Is SSL support only…
1
vote
4 answers

getting PHP PDO flavors to work on Mac OS X

I'm running OS X 10.5; it looks like it came with Apache and PHP installed (minus some minor configurations which I turned on per this page; I've used Apache before so I know the basics of how httpd.conf works). I've got a pre-existing script which…
Jason S
  • 616
  • 1
  • 16
  • 28
1
vote
1 answer

Connecting to SQL Server 2005 via PDO

I've upgraded my php installation to 5.4.14 using Microsoft's Web Platform Installer 4.6. Php is working great except I cannot connect to my database. My connection was working great before the upgrade, but now it will not work. Here is my…
Zamicol
  • 191
  • 1
  • 10
1
vote
2 answers

Dynamic column enumeration for preventing SQL injection

I have an application which is completely for internal use but I'm trying to make sure I have my bases covered on SQL injection. Unless someone else has some information to point me otherwise there is no way to dynamically specify the column…
crashmaxed
  • 193
  • 5
1
vote
1 answer

Compiling PHP on CentOS Needs MySQL PDO Configured

I am trying to compile PHP with mysql_pdo on CentOS 6 and I am having just one heck of a time trying to make it happen. Currently I am trying to compile PHP 5.2, but I am going to have to do this for 5.3 as I need to change versions. Here is the…
Josh Pennington
  • 288
  • 1
  • 6
  • 21
1
vote
1 answer

Apache won't restart with PDO MySQL enabled

I attempted to install the PDO MySQL driver onto a server with Solaris using the following commands: $ pecl download pdo_mysql $ tar xzf PDO_MYSQL-1.0.2.tgz $ cd PDO_MYSQL-1.0.2 $ phpize $ ./configure --with-pdo-mysql=/usr/local/mysql $ make $ make…
Wickethewok
1
vote
1 answer

mysql server freezes on inserts on a InnoDB table

CREATE TABLE IF NOT EXISTS `music_batch_song` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `music_batch_id` bigint(20) DEFAULT NULL, `song_id` bigint(20) DEFAULT NULL, `comment` varchar(10) DEFAULT NULL, `position` int(11) NOT NULL, …
giorrrgio
  • 11
  • 2
1
vote
1 answer

Compiling PHP 5 with PDO MySQL

I want to use Nginx with PHP5-FPM with MySQL PDO on Debian. To get PHP5-FPM on squeeze I need to compile PHP myself. First I tried to I did: apt-get install mysql-server libmysqlclient-dev I downloaded PHP 5.3.6. Then I configured PHP like…
i.amniels
  • 325
  • 1
  • 4
  • 9
1
vote
1 answer

How to enable PDO?

I have little server in Slicehost and i installed PHP 5.2.10 with PDO disabled. Now i'd like to enable it. Is there a way to enable it without too much fuzz? I'm not a pro admin :P. Thanks!
Gabriel
  • 416
  • 2
  • 7
  • 19
1
vote
2 answers

PDO Disabled in PHP... how to enable it?

Sorry I'm still a bit of a novice with dedicated hosting. Anyway, we have a dedicated server running cPanel and WHM. I have full terminal access and all that. Basically I've tried to install Chive to a user on my server's account. Unfortunately…
Jack
  • 169
  • 2
  • 2
  • 10
1
vote
0 answers

What might cause a PDO MySQL connection to be terminated?

Summarize the problem My PDO (MySQL) connection is disconnected during execution of the code. The connection is created successfully, but around 0.05% of the time the Error log reports a disconnection. Provide details and any research Created…
ipegasus
  • 111
  • 1
1
vote
0 answers

PHP PDO Very Slow on Fetch

I have a problem with a couple of queries running in PDO on PHP connecting to MSSQL server 2019. I have checked the time in SSMS and its fast. I have also added some timers into my code so I can see the time to execute the query and the time to…
Charlie
  • 11
  • 2