php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73707 Zend_Db_Statement_Exception: SQLSTATE[HY000]
Submitted: 2016-12-10 04:36 UTC Modified: 2021-08-22 04:22 UTC
From: bartek at bugpoint dot pl Assigned: cmb (profile)
Status: No Feedback Package: PDO related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bartek at bugpoint dot pl
New email:
PHP Version: OS:

 

 [2016-12-10 04:36 UTC] bartek at bugpoint dot pl
Description:
------------
I couldn't re-open https://bugs.php.net/bug.php?id=62571 so I post here new bug.

Test script:
---------------
test1.php:
<?php
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(__DIR__ . '/application'));
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
require_once 'Zend/Application.php';
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);

$db = new Zend_Db_Adapter_Pdo_Pgsql(array(
    'host' => 'localhost',
    'username' => 'test',
    'password' => 'hasłodlatest',
    'dbname' => 'test'
));

echo 'start' . "\n";
$select = $db->select()->from('aaa', '*');
print_r($db->fetchOne($select));
echo "\n";

$pid = pcntl_fork();
if ($pid == -1) {
    // pcntl_fork() failed
    echo('could not fork');
} elseif ($pid) {

} elseif ($pid == 0) {
    // you're in the new (child) process
    exec('/usr/bin/php /home/idea/CLI/test2.php &>/home/idea/CLI/test.log &');
    exit;
}

echo 'After fork' . "\n";

while (true) {
    sleep(5);
    $select = $db->select()->from('aaa', '*');
    print_r($db->fetchOne($select));
}

test2.php:
<?php
echo 'Forked' . "\n";

Expected result:
----------------
See https://bugs.php.net/bug.php?id=62571

Actual result:
--------------
See https://bugs.php.net/bug.php?id=62571

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-09 11:25 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-09 11:25 UTC] cmb@php.net
If this issue still persists with any of the actively supported
PHP versions[1], please provide a simple self-contained reproduce
script[2].  Also clarify whether this affects only PostGreSQL, or
is a general PDO issue, if possible.

[1] <https://www.php.net/supported-versions.php>
[2] <http://sscce.org/>
 [2021-08-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC