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: -
From: bartek at bugpoint dot pl Assigned:
Status: Open 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

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 15 18:01:27 2019 UTC