pdo Questions

1

I've got a CentOS 7 machine running PHP with webtatic PHP 5.6 and the php56w-mssql package installed. My application is in the Laravel framework connecting to an MSSQL 2012 database. I've modified...
Flattie asked 14/12, 2016 at 0:20

7

Solved

I'm doing an operation that inserts hundreds of records into a MySQL database. After inserting exactly 176 records I get this error: [PDOException] SQLSTATE[HY000]: General error: 2006 MySQL serve...
Benedict asked 21/10, 2015 at 3:31

11

Solved

I am trying to use a PHP connection to connect MySQL Database which is on phpmyadmin. Nothing fancy about the connection just trying to see whether the connection is successful or not. I am using M...
Ballroom asked 1/4, 2015 at 15:57

4

Solved

I receive sometimes the following error: SQLSTATE[HY000] [14] unable to open database file I open the datebase by using new PDO("sqlite:database/datbase.db","","",array( PDO::ATTR_PERSISTE...
Marzipan asked 4/9, 2014 at 14:31

5

Solved

I have a simple docker file, as follows: FROM php:7.2-apache COPY src/ /var/www/html/ Normally to install drivers for Mongo or MySQL connectivity I would do so by adding something like the below...
Flatus asked 20/8, 2018 at 14:29

7

Solved

I am trying to connect to an existing SQL Server database using PDO with the drivers provided by Microsoft. I have seen examples using odbc, dblib, mssql, etc., however I believe the connection st...
Iinde asked 5/10, 2012 at 13:41

10

Solved

So I am using my cmd on my laravel folder and I tried to do (php artisan migrate:install). 2 errors came up. [PDOException] SQLSTATE[HY000] [2006] MySQL server has gone away [ErrorException]...
Suffruticose asked 27/1, 2016 at 11:48

4

Solved

I have a problem with a new MariaDB 10.5.8 install. STRICT_TRANS_TABLES is set, and when I try to use $sql of: 'INSERT INTO test (flag) VALUES (?)' (where flag is defined as tinyint(1)) with var_d...
Illuse asked 17/11, 2020 at 11:33

4

Solved

For detecting the existence of a key in a hstore, I need to run a query like this: SELECT * FROM tbl WHERE hst ? 'foo' However, that gives me a PDOException: PDOException: SQLSTATE[HY093]: Inva...
Tautologize asked 1/5, 2013 at 2:33

3

Solved

I'm just editing my search script after reading up on SQL injection attacks. I'm trying to get the same functionality out of my script using PDO instead of a regular MySQL connection. So I've been ...
Berti asked 6/6, 2012 at 9:44

5

I am setting up PHP and MySQL (Maria DB) on Windows 8.1. I edited php.ini file and uncommented the following lines: extension=php_mysql.dll extension=php_mysqli.dll extension=php_pdo_mysql.dll B...
Peregrinate asked 20/9, 2014 at 12:30

6

Solved

Hi i'm received the could not find driver error when trying to connect to sqlite via a php file. I've set permission to 777... PHP Version 5.2.16, i have the module install. any reason why its not ...
Kura asked 10/1, 2012 at 13:6

2

Solved

I'm having trouble getting my data from fetchAll to print selectively. In normal mysql I do it this way: $rs = mysql_query($sql); while ($row = mysql_fetch_array($rs)){ $id = $row['id']; ...
Grotius asked 5/10, 2009 at 12:45

4

Solved

I have a database table timetable with a DATETIME field called created_on. created_on DATETIME, notes VARCHAR(255) NOT NULL I use the NOW() function to insert the current time through PDO prepar...
Amandaamandi asked 31/12, 2012 at 0:37

38

Solved

I believe that I've successfully deployed my (very basic) site to fortrabbit, but as soon as I connect to SSH to run some commands (such as php artisan migrate or php artisan db:seed) I get an erro...
Malvaceous asked 21/12, 2013 at 21:34

7

I have a Laravel Spark project that uses Horizon to manage a job queue with Redis. Locally, (on my Homestead box, Mac OS) everything works as expected, but on our new Digital Ocean (Forge provision...
Subequatorial asked 7/8, 2020 at 12:5

4

Solved

I am trying to connect to an external database using PDO. $dbh = new PDO('mysql:host=hotsname;port=3309;dbname=dbname', 'root', 'root'); However this is not working on one particular server I ha...
Tersanctus asked 10/1, 2014 at 14:22

23

Solved

I am building a web application in Laravel 5. The application is supposed to get "category names" stored on a MySQL database and display a form to add new "category names". When I execute the comma...
Heritage asked 11/9, 2015 at 1:42

6

When I run php artisan migrate command I get: [PDOException] could not find driver. I made my default database as sqlite and checked whether there are pdo drivers for sqlite using php -i comma...
Interbreed asked 15/8, 2016 at 5:32

5

Solved

I have this PHP-MySQL insert code: $sqlTeeth = "INSERT INTO teeth (id_logged, patient_id, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, si...
Remove asked 31/3, 2016 at 7:48

1

So I keep sporadically getting the following error: Type: PDOException Code: 2002 Message: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known File: /var...
Heterolecithal asked 11/8, 2017 at 12:30

13

Solved

I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: PDO::__construct(): Server sent charset...
Peplos asked 16/4, 2017 at 12:57

6

I ran the command: php -v Output: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: undefin...
Desorb asked 7/6, 2020 at 2:9

11

pdo is working fine with mysql but with pgsql its giving error 'PDOException' with message 'could not find driver' I've installed php5-pgsql package which also includes pdo_pgsql http://packages....
Demodulation asked 10/4, 2012 at 7:49

6

I have managed to read data of Microsoft Access file (.accdb) on Windows using PDO but I'm having problem getting to work on Linux (CentOS). I can see modules is installed: [root@rapid host]# php ...
Fontaine asked 20/11, 2012 at 12:22

© 2022 - 2024 — McMap. All rights reserved.