VectorLinux

The nuts and bolts => Software General => Topic started by: askfor on April 07, 2016, 12:06:09 am

Title: PHP, PostgreSQL, UnixOdbc/iOdbc
Post by: askfor 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.
Title: Re: PHP, PostgreSQL, UnixOdbc/iOdbc
Post by: M0E-lnx 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.
Title: Re: PHP, PostgreSQL, UnixOdbc/iOdbc
Post by: askfor 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).
 
Title: Re: PHP, PostgreSQL, UnixOdbc/iOdbc
Post by: retired1af 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.

Title: Re: PHP, PostgreSQL, UnixOdbc/iOdbc
Post by: M0E-lnx 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



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