Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-15923

Can't connect to a Postgres db in a PHP portlet

    Details

    • Branch Version/s:
      6.0.x

      Description

      When writing a PHP portlet, I am unable to create a connection to a Postgresql db using pg_connect(), the portlet displays:

      Warning: A link to the server could not be established. java.lang.ClassCastException: org.postgresql.Driver cannot be cast to javax.sql.DataSource [pg_connect]

      As a test, I've also tried to connect to a mysql db using php's mysql_connect(), which does work and I can query the db etc, so it seems to be a postgesql.jar specific issue.
      I've tried this on a couple of different machines with the same result.

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            foxpaul paul hendrick (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 7 weeks ago

                Packages

                Version Package
                --Sprint 11/12
                6.2.0 CE M2