Author Topic: PHP, PostgreSQL, UnixOdbc/iOdbc  (Read 3170 times)

askfor

  • Member
  • *
  • Posts: 33
  • user
PHP, PostgreSQL, UnixOdbc/iOdbc
« on: April 07, 2016, 12:06:09 am »
I have noticed that PHP does not have modules for PostgreSQL and iODBC or UNIXOdbc. I wonder why is that so.

PostgreSQL is one of the best database engines around, if one doesn't happen to be a BSD hater and GPL jihadist.

IODBC or UNIXOdbc allows connection majority of existing database engines on all platforms. Effectively all but most obscure ones.
Most of them have ODBC drivers for all platforms.

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3499
Re: PHP, PostgreSQL, UnixOdbc/iOdbc
« Reply #1 on: April 07, 2016, 08:22:28 am »
probably just needs to be re-built to enable this... The package is there, but idk of anyone using it.  If you want to help get them enabled, help us research what is needed to make it work.

askfor

  • Member
  • *
  • Posts: 33
  • user
Re: PHP, PostgreSQL, UnixOdbc/iOdbc
« Reply #2 on: April 07, 2016, 11:36:50 am »
I am not 100% sure, but, most likely it is:

- Apache (or Nginx or other) source

- PHP source

- PostgreSQL development (.h files)

- UNIXodbc or iODBC source

- Proper switches for building PHP (like '--with-xxxx'), too.

I know there is a paid support option for Vector Linux. Customers who would want to use it as application server platform will, most likely, need those features very much. With UNIXodbc or iODBC one could write PHP application which works with Oracle database on another machine or even with Microsoft SQL server on some Windows server.

It is not such a big deal, one could use proper pre-built Bitnami stack, which is also quick and easy to deploy. However, usually, those options exist in quite a few other distributions (Red Hat, OpenSUSE, Debian - those are ones I worked with).
 
« Last Edit: April 08, 2016, 12:14:18 am by askfor »

retired1af

  • Administrator
  • Vectorian
  • *****
  • Posts: 1475
Re: PHP, PostgreSQL, UnixOdbc/iOdbc
« Reply #3 on: April 08, 2016, 05:25:51 am »
Your typical "LAMP" setup is MySQL or MySQL fork like MariaDB. The reason PostgreSQL isn't used is it tends to be slower than MySQL. In a hosted environment, especially on shared servers, this can be a killer.

ASUS K73 Intel i3 Dual Core 2.3GHz

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3499
Re: PHP, PostgreSQL, UnixOdbc/iOdbc
« Reply #4 on: April 08, 2016, 01:00:18 pm »
It looks like the drivers are shipped in separate packages.  I have built a test package of the odbc driver.  If you'd like to test it, here how you can


  • Go to http://vlcore.vectorlinux.com:10080/git/m0e.lnx/psqlodbc/builds
  • Click on the build for your current vector version and architecture
  • Towards the right of the page, you will see a section called "Build Artifacts", click the blue button labeled "Browse"
  • Navigate to the binary package and download it.
  • Use "installpkg" to install the package you downloaded

if this works for you, we can have this package merged into the repositories.