Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2009
    Location
    Guadalajara
    Posts
    31

    Question Error for Create postgres databases

    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?

  2. #2
    Member
    Join Date
    Apr 2007
    Posts
    37

    Default

    i have the same issue -- anybody have any ideas?


    ERROR: role "CPANEL_USERNAME" does not exist

  3. #3
    Member
    Join Date
    Apr 2007
    Posts
    37

    Default

    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?

  4. #4
    Member
    Join Date
    Apr 2007
    Posts
    37

    Default

    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.

  5. #5
    Member
    Join Date
    Apr 2006
    Posts
    30

    Default

    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 by halie; 05-05-2009 at 05:38 AM.

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by halie View Post
    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.

  7. #7
    Member
    Join Date
    Apr 2006
    Posts
    30

    Default

    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

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by halie View Post
    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.

    Quote Originally Posted by halie View Post
    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.

    Quote Originally Posted by halie View Post
    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.

  9. #9
    Member xisn's Avatar
    Join Date
    Dec 2004
    Posts
    117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    This worked perfectly, Thanks!

    Quote Originally Posted by TaneNZ View Post
    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.

  10. #10
    Registered User
    Join Date
    Feb 2009
    Posts
    1

    Default PDO-PostgreSQL

    Quote Originally Posted by cPanelDavidG View Post
    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

  11. #11
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by filipek View Post
    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/Al...8/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.

Similar Threads & Tags
Similar threads

  1. Replies: 2
    Last Post: 06-08-2011, 12:26 AM
  2. Shift Postgres's databases to another bigger partition
    By gundamz in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-30-2007, 03:08 PM
  3. cannot create databases
    By rooshi in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-01-2005, 07:43 AM
  4. Do the backup scripts backup postgres databases
    By fishfreek in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-13-2005, 06:17 PM
  5. CPanel doesn't create Postgres DB
    By Rafaelfpviana in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-03-2004, 12:14 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube