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...
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...
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...
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]...
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...
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 ...
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...
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 ...
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'];
...
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...
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...
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...
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...
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...
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...
1
Sporadic PDOException [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
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...
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...
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
1 Next >
© 2022 - 2024 — McMap. All rights reserved.