With a fresh install (no tables in the database) this warning appears with the progress bar:
Warning: PDO::__construct(): SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes in DatabaseConnection->__construct() (line 289 of /home/ ... /public_html/postgres/includes/database/database.inc).
And the above error and this error appear after Set up database and before Install profile:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: http://www. ... .com/postgres/install.php?profile=standard&locale=en&id=1&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")" LINE 1: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC... ^: SELECT * FROM {menu_router} WHERE path IN () ORDER BY fit DESC LIMIT 1 OFFSET 0; Array ( ) in menu_get_item() (line 426 of /home/..../public_html/postgres/includes/menu.inc).
PHP Version 5.2.14, PostGres 8.4.4, Apache/2.2.16, CENTOS 5.5 x86_64 (pdo_pgsql for 8.4.4, module version 1.0.2, revision $Id: pdo_pgsql.c,v 1.7.2.11 2006/03/14 10:49:18 edink Exp $ ).
On my home setup, the install works perfectly:
PHP Version 5.3.1, PostGres 8.4.4, Apache/2.2.14, OS X 10.4.11 (pdo_pgsql for 8.3.4, module version 1.0.2, $Id: pdo_pgsql.c 277898 2009-03-28 01:58:49Z mbeccati $)
Looks to me like I need to look at my version of pdo_pgsql, in addition to my version of PHP?
Comments
Comment #1
damien tournoud commentedI haven't looked at the sources for a while, but 2006 seems unlikely for a PHP 5.2.14 pdo_pgsql.c. Where does your PDO come from? Could that be a case of a PECL-installed PDO? If so, why hasn't our requirement test picked it up?
Comment #2
shunting commentedI had my ISP upgrade PHP to PHP Version 5.3.2 (different from my original comments), and then I had them reinstall pdo_psql. Here is what phpinfo says:
When I install, I get this warning:
The installation completes in the progress bar, and then fails with this error:
What more information would help?
Comment #3
mark trappThis is still an issue in 7.x-dev, and does arise from using the PDO_PGSQL PECL package. Notably, PECL is the only way that I know of to get PostgreSQL support without having to recompile PHP in Mac OS X, and is documented around the internet as the way to add PostgreSQL support to Mac OS X's PHP build.
While it might cause an installation failure, it only causes the warning elsewhere (like if you're accessing a PostgreSQL database as a secondary database via
db_set_active()):Outside of the installation process, it doesn't seem to affect the ability to use the database system: results are returned correctly and data is added back into the database correctly.
This doesn't seem to be PHP or PostgreSQL version specific: I've hit this on PHP 5.2.x and 5.3.x as well as PostgreSQL 8.4.x and 9.0.x.
It may be the case that not compiling PHP with PDO PostgreSQL support is just plain not supported (which would mean users using the default Mac OS X/Mac OS X server stack are out of luck), but figured I'd update this with the reduction.
Comment #4
damien tournoud commentedPDO PECL is not supported by either PHP nor Drupal.
Comment #5
shunting commentedTried again with the postgres 8.4.4, php 5.3.2 on a CentOS/cPanel installation, with Drupal 7.8.
Error message
* Warning: PDO::__construct() [pdo.--construct]: SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes in DatabaseConnection->__construct() (line 304 of /home/wwwnonvi/public_html/includes/database/database.inc).
* PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")" LINE 1: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC... ^: SELECT * FROM {menu_router} WHERE path IN () ORDER BY fit DESC LIMIT 1 OFFSET 0; Array ( ) in menu_get_item() (line 450 of /home/wwwnonvi/public_html/includes/menu.inc).
I can't get beyond this error, so, showstopper. As far as my ISP's staff knows, the PECL version of pdo_pgsql is NOT used.
Comment #6
jaywhy13 commentedI'm having the same issue.. did you manage to get this resolved?
Comment #7
liam morlandComment #8
joshf commentedFor anyone using Jose Gonzalez's homebrew php recipe, you can simply
Replace 54 with 53 or 55 depending on your version.