Uncaught exception 'PDOException' with message 'SQLSTATE[08006] [7] timeout expired - php

I get this error message when i try to connect postgresql via PHP on Windows
Warning: Uncaught exception 'PDOException' with message 'SQLSTATE[08006] [7] timeout expired' in C:\Apache24\htdocs\projetbdd\reconcept.php:2 Stack trace: #0 C:\Apache24\htdocs\projetbdd\reconcept.php(2): PDO->__construct('pgsql:host=loca...', 'postgres', 'momocrosse') #1 {main} thrown in C:\Apache24\htdocs\projetbdd\reconcept.php on line 2
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Apache24\htdocs\projetbdd\reconcept.php on line 2

you can specifies the timeout duration of the connection by use:
$connection->setAttribute(PDO::ATTR_TIMEOUT, 15);
form more details see this page:
http://php.net/manual/en/pdo.setattribute.php

Related

PHP Fatal error: Uncaught SoapFault exception in error_log

I'm doing some requests to an external service, problem is that sometimes the external service is not responding (I think their server is offline or something like that).
The problem with that is the error which is written each time on the error_log:
[07-May-2022 04:31:05 UTC] PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /path/file.php:115
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://app.mela...', 'http://app.mela...', 1, 0)
....
....
How to avoid to write that error inside error log?
The code inside /path/file.php:115 is this:
$response = $this->client->getOrders($userId,$order,$orderColumn,$orderType,$limitStart,$limitSize);
Thanks for your help.

PDO Drivers not installed on XXAMP error, even after uncommenting out the MySQL.dll extension to enable it

I am trying to connect to a remote device , PLC (programmable logic controller) through WAMP, but for some reason I get this error when I load the file in the browser
This is the error mesageFatal error:
Uncaught PDOException: could not find driver in
D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php:5 Stack trace: #0
D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php(5):
PDO->__construct('sqlsrv:Server=B...', 'user', 'password') #1 {main}
thrown in D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php on line 5
I tried uncommenting out the MySQL drivers to enable them, but all in vain
Fatal error: Uncaught PDOException: could not find driver in
D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php:5 Stack trace: #0
D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php(5):
PDO->__construct('sqlsrv:Server=B...', 'sa', 'admin,2017') #1 {main}
thrown in D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php on line 5
This is the error mesageFatal error:
Uncaught PDOException: could not find driver in
D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php:5 Stack trace: #0
D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php(5):
PDO->__construct('sqlsrv:Server=B...', 'user', 'password') #1 {main}
thrown in D:\xxamp\htdocs\REMOTE_BOOSTER\getPLC.php on line 5

remove "Uncaught exception on GetStream"

when the network is off-line, GetStream triggers an "Uncaught exception" error with a lot of detailed information on the code paths and structure.
How do I setup gestream so that no error message is printed in production?
Uncaught exception 'GetStream\Stream\StreamFeedException' with message 'user_id can only contain alphanumeric characters'
This is the full error:
Fatal error: Uncaught exception 'GuzzleHttp\Exception\ConnectException'
with message 'cURL error 28: Operation timed out after 0 milliseconds with 0
out of 0 bytes received
(see http://curl.haxx.se/libcurl/c/libcurl-errors.html)'
in /Sites/home-local/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:186
Stack trace: #0 /Sites/homelocal/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(150):
GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 /Siteshome-local/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(103):
GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler),
Object(GuzzleHttp\Handler\EasyHandle),Object(GuzzleHttp\Handler\CurlFactory))
#2 /Sites/home-local/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 186

PhpPowerpoint fatal error

I was in the process of viewing an existing pptx file using the reader of Powerpoint2007 but
i get this fatal error:
Fatal error: Uncaught exception 'Exception' with message 'File ./resources/phppowerpoint_logo.gif not found!' in C:\xampp\PHPPresentation-master\src\PhpPresentation\Shape\Drawing.php:107 Stack trace: #0 C:\xampp\PHPPresentation-master\samples\Sample_Header.php(49): PhpOffice\PhpPresentation\Shape\Drawing->setPath('./resources/php...') #1 C:\xampp\htdocs\sanagumana.php(8): include_once('C:\xampp\PHPPre...') #2 {main} thrown in C:\xampp\PHPPresentation-master\src\PhpPresentation\Shape\Drawing.php on line 107
I already check the resources folder and phppowerpoint_logo.gif is there. What can I do??

simpleexcel : I get an error when I changed the host

Recently I have changed my host. On the previous host, every thing was ok, but now on the new host I get following error..
Please direct me to the host so I can solve this problem ASAP???
Fatal error: Uncaught exception 'Exception' with message 'Document namespace isn't a valid Excel XML 2003 Spreadsheet' in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php:198
Stack trace:
#0 /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php(305): SimpleExcel\Parser\XMLParser->parseDOM(Object(SimpleXMLElement))
#1 /home/jalali/public_html/admin/#dmin.php(28): SimpleExcel\Parser\XMLParser->loadFile('../archive/1371...')
#2 {main} thrown in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php on line 198

Categories