php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56683 PDO_PGSQL cannot be upgraded
Submitted: 2005-11-30 10:56 UTC Modified: 2013-10-15 11:54 UTC
From: mdv at inyourpocket dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.1.1 OS: debian
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-11-30 10:56 UTC] mdv at inyourpocket dot com
Description:
------------
PDO_PGSQL cannot be upgraded

i have php 5.1.1

Reproduce code:
---------------
/usr/local/php/bin/pecl upgrade PDO
Skipping package "pear/PDO", already installed as version 1.0.2
No valid packages found
upgrade failed

/usr/local/php/bin/pecl upgrade PDO_PGSQL
pear/PDO_PGSQL requires PHP extension "pdo" (version >= 1.0.2)
No valid packages found
upgrade failed



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-30 13:55 UTC] wez@php.net
Do you have PDO loaded in your php.ini file?

extension=pdo.so
 [2005-12-01 05:37 UTC] mdv at inyourpocket dot com
yes, here is result of php -i:
----
PDO

PDO support => enabled
PDO drivers =>

pdo_pgsql

PDO Driver for PostgreSQL => enabled
----
 [2005-12-01 07:37 UTC] wez@php.net
Sounds like the same issue as #6117.
Try using "pear" instead of "pecl" to perform the upgrade.
 [2005-12-01 07:46 UTC] mdv at inyourpocket dot com
/usr/local/php5/bin/pear install PDO_PGSQL
PHP Fatal error:  PDO: driver pgsql requires PDO API version 20051031; this is PDO version 20051128 in Unknown on line 0
No releases available for package "pear.php.net/PDO_PGSQL" - package pecl/PDO_PGSQL can be installed with "pecl install PDO_PGSQL"
Cannot initialize 'PDO_PGSQL', invalid or missing package file
Package "PDO_PGSQL" is not valid
install failed


and:

/usr/local/php5/bin/pear install PDO
PHP Fatal error:  PDO: driver pgsql requires PDO API version 20051031; this is PDO version 20051128 in Unknown on line 0
No releases available for package "pear.php.net/PDO" - package pecl/PDO can be installed with "pecl install PDO"
Cannot initialize 'PDO', invalid or missing package file
Package "PDO" is not valid
install failed
 [2005-12-02 06:50 UTC] mdv at inyourpocket dot com
if install over pecl PDO, then download PDO_PGSQL and install manually, everything is OK

pecl list returns:
(no packages installed from channel pecl.php.net)

but at least PDO was installed by pecl

pear list returns:
Installed packages, channel pear.php.net:
=========================================
Package        Version State
Archive_Tar    1.3.1   stable
Console_Getopt 1.2     stable
Mail           1.1.9   stable
Mail_Mime      1.3.1   stable
PDO            1.0.2   stable
PDO_PGSQL      1.0.1   stable
PEAR           1.4.5   stable
XML_RPC        1.4.4   stable
zip            1.0     stable
 [2005-12-02 06:50 UTC] mdv at inyourpocket dot com
if install over pecl PDO, then download PDO_PGSQL and install manually, everything is OK

pecl list returns:
(no packages installed from channel pecl.php.net)

but at least PDO was installed by pecl

pear list returns:
Installed packages, channel pear.php.net:
=========================================
Package        Version State
Archive_Tar    1.3.1   stable
Console_Getopt 1.2     stable
Mail           1.1.9   stable
Mail_Mime      1.3.1   stable
PDO            1.0.2   stable
PDO_PGSQL      1.0.1   stable
PEAR           1.4.5   stable
XML_RPC        1.4.4   stable
zip            1.0     stable
 [2006-01-16 11:42 UTC] miki at canaan dot co dot il
I have the same problem thugh on my side i try to install:
first I isntalled PDO succesfuly. php recognize it.

then did:
pecl install pdo pdo_pgsql
Skipping package "pear/PDO", already installed as version 1.0.2
pear/PDO_PGSQL requires PHP extension "pdo" (version >= 1.0.2)
No valid packages found
install failed

Cheers
 [2006-01-16 13:56 UTC] miki at canaan dot co dot il
I tried installing manualy:

pear install -O -n PDO_PGSQL-1.0.1.tgz
warning: pear/PDO_PGSQL requires PHP extension "pdo" (version >= 1.0.2)
7 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
building in /var/tmp/pear-build-root/PDO_PGSQL-1.0.1
running: /tmp/tmpeiEbbj/PDO_PGSQL-1.0.1/configure
..
..
..
..
checking for PDO includes... checking for PDO includes... /usr/include/php/ext
configure: error:
You've configured extension pdo_pgsql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.

ERROR: `/tmp/tmpeiEbbj/PDO_PGSQL-1.0.1/configure' failed

This is what installed:

#pear list
Installed packages, channel pear.php.net:
=========================================
Package        Version State
Archive_Tar    1.3.1   stable
Console_Getopt 1.2     stable
PDO            1.0.2   stable
PEAR           1.4.6   stable

#pecl list
(no packages installed from channel pecl.php.net)

here is a phpinfo() from the current system:
http://www.canaan-net.com/test.phtml

Any ideas ?
 [2006-01-17 05:47 UTC] mdv at inyourpocket dot com
i think that is problem with pear/pecl (pear loads extensions like pdo.so... but pecl not), so you cannot install PDO_XXXX using pecl (i think)

1. install PDO via pecl (should be no problem)
2. add "extension=pdo.so" to php.ini
3. use pear (NOT pecl) to install pdo_pgsql (but specify file to install):      
   pear install http://pecl.php.net/get/PDO_PGSQL-1.0.1.tgz
4. If get error like:
   checking for pg_config... not found
   configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL   
   installation path
   ERROR: `/tmp/tmpjkxUNQ/PDO_PGSQL-1.0.1/configure' failed
   postgresql installed in nonstandard location (like /usr/local/pgsql)
   need link pg_config to /usr/bin:
   4.1. ln -s <where you have installed psql>/bin/pg_config /usr/bin/pg_config
   4.2. then run again pear install  
        http://pecl.php.net/get/PDO_PGSQL-1.0.1.tgz
5. add "extension=pdo_pgsql.so" to php.ini
 [2006-01-17 09:00 UTC] miki at canaan dot co dot il
Reinstalled pdp 1.0.2 easily. then I added extension=pdo.so to both:
/etc/php5/apache/php.ini &
/etc/php5/cli/php.ini

phpinfo(); showed that: the configure was with --disable-pdo but later on i see the PDO is enabled.
referance: http://www.canaan-net.com/test.phtml

and still im getting the folloing error: ( now with all the buid info )

# pear install http://pecl.php.net/get/PDO_PGSQL-1.0.1.tgz
downloading PDO_PGSQL-1.0.1.tgz ...
Starting to download PDO_PGSQL-1.0.1.tgz (13,308 bytes)
.....done: 13,308 bytes
7 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
building in /var/tmp/pear-build-root/PDO_PGSQL-1.0.1
running: /tmp/tmpYiSIwo/PDO_PGSQL-1.0.1/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext
checking for PHP extension directory... /usr/lib/php5/20050922
checking for PHP installed headers prefix... /usr/include/php5
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for PostgreSQL support for PDO... yes, shared
checking for pg_config... /usr/bin/pg_config
checking for openssl dependencies... yes
checking for PQescapeString in -lpq... yes
checking for PQsetnonblocking in -lpq... yes
checking for PQcmdTuples in -lpq... yes
checking for PQoidValue in -lpq... yes
checking for PQclientEncoding in -lpq... yes
checking for PQparameterStatus in -lpq... yes
checking for PQprotocolVersion in -lpq... yes
checking for PQtransactionStatus in -lpq... yes
checking for PQunescapeBytea in -lpq... yes
checking for PQExecParams in -lpq... no
checking for PQresultErrorField in -lpq... yes
checking for pg_encoding_to_char in -lpq... yes
checking for PQprepare in -lpq... no
checking for PDO includes... checking for PDO includes... /usr/include/php/ext
configure: error:
You've configured extension pdo_pgsql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.

ERROR: `/tmp/tmpYiSIwo/PDO_PGSQL-1.0.1/configure' failed

tried to play with includes and such but no success.
The server is Debian Sarge with Dotdeb backports

im totaly lost
 [2006-01-27 02:17 UTC] mastabog at hotmail dot com
Join the club :(

Following a hint from #6117 I converted the package.xml to package2.xml (pecl convert) and tried inserting a bogus dependency and provider ... no luck. Tried removing the pdo dependency ... no luck with that either.

This definitely needs to be addressed. I'm surprised though because it has been reported 2 months ago ...
 [2006-02-08 15:10 UTC] m dot regner at larkos dot de
I don't get this error during update but when i tried to install pdo and pdo_pgsql.

I got it running now and maybe someone can put some light in this matter.

I discovered while crawling through the configure file of the pdo_pgsql package, that it seems to pretend, that pdo is build statically. It checkes a variable called:
PHP_PDO_SHARED
So when i do:
export PHP_PDO_SHARED="true"
and than do
http://pecl.php.net/get/PDO_PGSQL-1.0.1.tgz
everything installs and works fine.

I don't know, if this is a bug or if i have overseen some other configuration step.

However for everybody who needs to get this stuff running fast, this is hopefully a interim solution
Greetings so far
 [2006-02-08 15:13 UTC] m dot regner at larkos dot de
Sorry i missed somthing in my description of my solution:

I only copied the link and not the full command so here it is:

pear install -f http://pecl.php.net/get/PDO_PGSQL-1.0.1.tgz

The -f overruns the dependency-testing of pear.

Greetings again
 [2013-06-12 02:01 UTC] ssufficool@php.net
-Status: Open +Status: Feedback -Package: PDO_PGSQL +Package: *General Issues
 [2013-06-12 02:01 UTC] ssufficool@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2013-10-15 11:54 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-2019 The PHP Group
All rights reserved.
Last updated: Sat Feb 16 10:01:24 2019 UTC