Error for Create postgres databases

camposomar

Active Member
PartnerNOC
Mar 30, 2009
31
0
56
Guadalajara
Hi all

i try create postgres databases after create not appear in box of databeses but not appear errors when try create, i try view in log erros of cpanel and can view this:

ERROR: role "corecolo" does not exist
ERROR: role "corecolo" does not exist
ERROR: role "corecolo" does not exist

can help me?:(:confused:
 

TaneNZ

Active Member
Apr 11, 2007
37
0
156
i have the same issue -- anybody have any ideas?


ERROR: role "CPANEL_USERNAME" does not exist
 

TaneNZ

Active Member
Apr 11, 2007
37
0
156
ok .. this only appears to effect accounts that were already on the server before postgresql was installed. new accounts are fine.

so cpanel doesn't add roles for the old accounts, only newly created ones.

fix?
 

TaneNZ

Active Member
Apr 11, 2007
37
0
156
fix pretty much is..

(as root)

cd /var/cpanel/users && for x in *; do su -c "createuser -S -D -R $x" postgres; done


it'll create all the missing entries. hope this helps.
 

halie

Active Member
Apr 12, 2006
30
0
156
Guys, what version of Postgres are you using and is it currently working with PHP?

My host has stated that recent bugs in cPanel mean that cPanel's PHP does not support Postgres, that PhpPgAdmin is not currently compatible with cPanel, and that PDO support is not stable. They also say that although they logged these issues 3 months ago, cPanel (the company) has not provided a solution in all that time.

Is this true? Is no-one able to use cPanel, Postgres and PHP together at the moment?

We are using the following:

cPanel 11.24.4-R35075 (RELEASE)
WHM 11.24.2 - X 3.9
CENTOS 5.2 i686 standard (kernel 2.6.18-92.el5PAE)

PostgreSQL 8.1
PHP 5.2.8 (suPHP)

I'd appreciate any information about this, as I really need Postgres support for PHP, but currently my host does not convey any urgency about the matter, and blames cPanel entirely.

Thanks in advance
Halie
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Guys, what version of Postgres are you using and is it currently working with PHP?

My host has stated that recent bugs in cPanel mean that cPanel's PHP does not support Postgres, that PhpPgAdmin is not currently compatible with cPanel, and that PDO support is not stable. They also say that although they logged these issues 3 months ago, cPanel (the company) has not provided a solution in all that time.

Is this true? Is no-one able to use cPanel, Postgres and PHP together at the moment?

We are using the following:

cPanel 11.24.4-R35075 (RELEASE)
WHM 11.24.2 - X 3.9
CENTOS 5.2 i686 standard (kernel 2.6.18-92.el5PAE)

PostgreSQL 8.1
PHP 5.2.8 (suPHP)

I'd appreciate any information about this, as I really need Postgres support for PHP, but currently my host does not convey any urgency about the matter, and blames cPanel entirely.

Thanks in advance
Halie
If you can provide ticket numbers or case numbers, I can follow-up with those issues.

At this time, cPanel/WHM does support PostgreSQL and if the PostgreSQL module for PHP is added via EasyApache, you can use PostgreSQL via PHP.

We bundle phpPgAdmin with cPanel/WHM and it automatically becomes available once a PostgreSQL installation is detected.
 

halie

Active Member
Apr 12, 2006
30
0
156
Thank you, cPanelDavidG, for your quick reply.

This issue with my host has been outstanding for 3 months, and they now state that they have had to put the issue "on hold" because the tickets they have logged with your company have not been resolved. Despite this, other hosts that I have spoken to are running PHP, Postgres and cPanel without any problem.

Could you confirm that you have noted the versions of WHM/cPanel/PHP/Postgres that we are using, when you wrote your previous reply?

Are you aware of any general issues with PDO support for Postgres, when using cPanel? For example, I believe that the following two PHP configure options need to be used, for it to work correctly:
--with-pdo-pgsql=shared,/usr/local/pgsql
--with-pgsql=shared,/usr/local/pgsql

I don't have details of the ticket numbers at the moment, but will certainly ask my host to provide them to you, once I have a little more background information about the issue.

Many thanks again for your help with this.
Halie
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Thank you, cPanelDavidG, for your quick reply.

This issue with my host has been outstanding for 3 months, and they now state that they have had to put the issue "on hold" because the tickets they have logged with your company have not been resolved. Despite this, other hosts that I have spoken to are running PHP, Postgres and cPanel without any problem.

Could you confirm that you have noted the versions of WHM/cPanel/PHP/Postgres that we are using, when you wrote your previous reply?
Yes. I especially noted you were using PostgreSQL 8.1 which is the latest version available from the CentOS/RHEL repositories at this time despite the latest released version being 8.3, which some of our customers have managed to get running in a cPanel/WHM environment as well.

Are you aware of any general issues with PDO support for Postgres, when using cPanel? For example, I believe that the following two PHP configure options need to be used, for it to work correctly:
--with-pdo-pgsql=shared,/usr/local/pgsql
--with-pgsql=shared,/usr/local/pgsql
While we do support PDO and PostgreSQL, we do not yet support a PDO-PostgreSQL module like we do for MySQL. You will need to use regular PDO or the PostgreSQL module's support for Postgres to use PostgreSQL via PHP.

I don't have details of the ticket numbers at the moment, but will certainly ask my host to provide them to you, once I have a little more background information about the issue.

Many thanks again for your help with this.
Halie
Sure, if I can have the ticket numbers so I can investigate this as well that'd be very helpful.
 

filipek

Registered
Feb 9, 2009
1
0
51
PDO-PostgreSQL

While we do support PDO and PostgreSQL, we do not yet support a PDO-PostgreSQL module like we do for MySQL. You will need to use regular PDO or the PostgreSQL module's support for Postgres to use PostgreSQL via PHP.
Hi David,

I'm moving a huge PHP application to a server and it uses PDO-PostgreSQL (Propel requires it), so looks like I have no option but to install this module.

Could you give me any advice on that? Maybe how to "force" the installation (it's for homologation and testing purposes, so there's no need to use a "stable" version). Or some other way to proceed?

Thanks in advance,

Filipe
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Hi David,

I'm moving a huge PHP application to a server and it uses PDO-PostgreSQL (Propel requires it), so looks like I have no option but to install this module.

Could you give me any advice on that? Maybe how to "force" the installation (it's for homologation and testing purposes, so there's no need to use a "stable" version). Or some other way to proceed?

Thanks in advance,

Filipe
One way to proceed is to create a custom EasyApache Optional Module (OptMod). You can almost think of custom OptMods as being plug-ins for EasyApache. You can find an explanation of how to do this in Dan's EasyApache Build presentation at the 2008 cPanel Conference:

http://twiki.cpanel.net/twiki/pub/AllDocumentation/TrainingResources/TrainingSlides08/EA3Build.pdf

I recommend looking at some of the Custom OptMods posted to EasyApache - cPanel Inc. - especially those pertaining to PHP like the one for GD with JIS mapped Japanese font support to have a better understanding of how you can do this.