php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33514 Postgres dll not included in PECL
Submitted: 2005-06-30 11:33 UTC Modified: 2005-06-30 16:22 UTC
From: francoisdanielloubser at hotmail dot com Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 5.0.4 OS: Windows XP
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: francoisdanielloubser at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-06-30 11:33 UTC] francoisdanielloubser at hotmail dot com
Description:
------------
The PECL distribution for PHP 5.0.4 does not include the postgres dll. Instead it include's another one that does not work. Even if I rename the dll included to be the same as the name in the ini file and copy it to the windows system directory, I still get the same error.

Reproduce code:
---------------
<?php
/*
 * Define PostgreSQL database server connect parameters.
 */
define('PGHOST','10.0.0.218');
define('PGPORT',5432);
define('PGDATABASE','example');
define('PGUSER', 'root');
define('PGPASSWORD', 'nopass');
define('PGCLIENTENCODING','UNICODE');
define('ERROR_ON_CONNECT_FAILED','Sorry, can not connect the database server now!');

/*
 * Merge connect string and connect db server with default parameters.
 */
pg_pconnect('host=' . PGHOST . ' port=' . PGPORT . ' dbname=' . PGDATABASE . ' user=' . PGUSER . ' password=' . PGPASSWORD);

/*
 * generate sql statements to call db-server-side stored procedure(or function) 
 * @parameter    string    $proc        stored procedure name.
 * @parameter    array    $paras        parameters, 2 dimensions array.
 * @return        string    $sql = 'select "proc"(para1,para2,para3);'
 * @example    pg_prepare('userExists',
 *                            array(
 *                                array('userName','chin','string'),
 *                                array('userId','7777','numeric')
 *                            )
 * )
 */
function pg_prepare($proc, $paras)
{
   $sql = 'select "' . $proc . '"(';
   $sql .= $paras[0][2] == 'numeric' ? $paras[0][1] : "'" . str_replace("'","''",$paras[0][1]) . "'";
   $len = count($paras);
   for ($i = 1; $i < $len; $i ++)
   {
       $sql .= ',';
       $sql .= $paras[$i][2] == 'numeric' ? $paras[$i][1] : "'" . str_replace("'","''",$paras[$i][1]) . "'";
   }
   $sql .= ');';
   return $sql;
}
?> 

Expected result:
----------------
Standard example

Actual result:
--------------
Error cannot find dll.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-30 11:52 UTC] tony2001@php.net
php_pg_sql.dll is bundled with main PHP distribution, you're looking for it in wrong place.
Btw, PECL bugs should be reported here: http://pecl.php.net/bugs/
 [2005-06-30 15:15 UTC] francoisdanielloubser at hotmail dot com
According to the website documentation the dll is no longer included with PHP as in PHP 4, but included instead with PECL. Even if it is included I can't find it anywhere if I search for it. What is the default directory for it?
 [2005-06-30 16:22 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 15:01:31 2024 UTC