JoomlaWorks

Member Dashboard
  • Home
  • Extensions
    • Commercial
      • Frontpage Slideshow
      • Simple Image Gallery Pro
    • Free
      • K2
      • AllVideos
      • DISQUS Comments for Joomla!
      • IAKI (Import As K2 Image)
      • Quick Menu (for Joomla 4)
      • Simple Image Gallery
      • Simple RSS Feed Reader
    • Free On Github
      • Akismet for Kunena
      • Fill It Up
      • K2 Example Plugin
      • K2 Links for JCE
      • Rebuild K2 Image Cache (CLI utility for K2)
      • URL Normalizer
      • User Extended Fields for K2
  • Demos
    • Joomla Extension Demos
    • WordPress Plugin Demos
  • Labs
    • Joomla 3.x UTD
    • Web Apps
      • JSON 2 JSONP
      • Feed Reader (bookmarklet)
      • Device Info
  • Support
    • Documentation for Joomla Extensions
      • AllVideos
      • Frontpage Slideshow
      • Simple Image Gallery
      • Simple Image Gallery Pro
    • Get Help
      • Community Forum
        • Recent Topics
        • Categories
        • Create free account
      • Help Desk
      • Contact Us
  • About
    • Blog
    • Company
    • License & Terms of Service
    • Privacy Policy
  • My Account

Displaying items by tag: php

16 03 2010
Written by JoomlaWorks
Published in Blog
Tagged under
  • +centos
  • +cpanel
  • +ingres
  • +pecl
  • +php
  • +whm
5 comments

Install Ingres DB Community Edition and Ingres support for PHP on CentOS

This is a guide to save you from banging your head against a wall, in case you ever want to get PHP talk with Ingres on a CentOS machine.

After hours of searching around and not finding not one damn proper guide, I decided to just write one down (after much trial and error).

What we wanna do is basically query an Ingres database through a CentOS based LAMP server (which runs WHM/CPanel too). So we need to install (unfortunately) the Ingres Community Database (as the PECL Ingres package seems to require it to be installed) and of course we need to install PHP's package for Ingres (PECL Ingres) so we can query an Ingres database from PHP. Still with me?

Let's get started...

1. Install Ingres and PHP/Ingres support on CentOS:

Install Ingres DB Community Edition first as it's obviously required by PECL's Ingres package. Here we install the related RPM for a 32-bit CentOS machine. The process is the same for 64-bit, the file is just different. Sign up on ingres.com for a free account and go to http://www.ingres.com/downloads/ingres-database.php to download the right release. Ingres.com is passing the download link from some script, so if you wanna pinpoint the URL and not download the file to your PC, then upload onto your server, you can simply right-click on the download manager in Firefox and copy the "link location". This will give you the URL where the actual file of the Ingres db relies on the ingres.com site, so you can use "wget". In this case, the path I got was something like "http://98.129.177.132/~GqxCOi/ingres-10.0.0-119-NPTL-gpl-pc-linux-i386.tgz". Don't try this link in particular as it may not work when you read this...

You obviously need root access to the server:

# cd /usr/src # wget http://98.129.177.132/~GqxCOi/ingres-10.0.0-119-NPTL-gpl-pc-linux-i386.tgz # tar -zxvf ingres-10.0.0-119-NPTL-gpl-pc-linux-i386.tgz # cd ingres-10.0.0-119-NPTL-gpl-pc-linux-i386 # sh ingres_express_install.sh

This process will install Ingres in /opt/Ingres/IngresII/

2. Install the PECL Ingres package for PHP.

Using "pecl install ingres" will simply NOT work. So we do it the old-fashioned way. Grab the latest package here: http://pecl.php.net/package/ingres and then do the following:

# cd /usr/src # wget http://pecl.php.net/get/ingres-2.2.2.tgz # tar -zxvf ingres-2.2.2.tgz # cd ingres-2.2.2 # phpize # ./configure --with-ingres=/opt/Ingres/IngresII # make # make install

This process will install the PECL Ingres package for PHP.

We need a couple more things, before we get started.

We need to declare some system variables in Apache. If you use WHM/CPanel, go to Main >> Service Configuration >> Apache Configuration >> Include Editor and choose to edit the "Pre Main Include" file. Add the following 2 lines:

SetEnv II_SYSTEM /opt/Ingres/IngresII SetEnv LD_LIBRARY_PATH /opt/Ingres/IngresII/ingres/lib

If you don't use Cpanel, just paste these lines into your httpd.conf file.

Now locate the WHM/CPanel php.ini file at /usr/local/lib/php.ini (if you don't use WHM/Cpanel it's probably located in /usr/lib/php.ini). Find the line "; Directory in which the loadable extensions (modules) reside." and right after that add:

extension = "ingres.so"

This will make sure the related PHP extension for Ingres support is loaded by PHP.

That's it.

Go to your "public_html" folder (or any other folder) and test if you got Ingres support for PHP installed properly. We'll use a dummy connection file, so get the code below:

<?php $link = ingres_connect("database", "user", "password")  or die("Could not connect: " . ingres_error($link)); echo "Connected successfully"; ?>

…and save this as "ingres.php". Now visit this file from your browser and if you get a "Warning: ingres_connect()..." then it means Ingress support for PHP is installed properly!

Enjoy!

Read more...
BY MAIL BY RSS

Archives

  • November 2026 (2)
  • October 2026 (3)
  • July 2026 (1)
  • April 2026 (1)
  • May 2024 (1)
  • March 2023 (1)
  • January 2022 (1)
  • July 2021 (2)
  • May 2021 (1)
  • February 2021 (1)
  • December 2020 (1)
  • September 2020 (1)

Tag Cloud

allvideos announcement apache community cpanel frontpage slideshow future j3x-utd joomla k2 Performance plugin release sh404sef simple image gallery simple image gallery pro simple rss feed reader socialconnect update video

Latest Entries

  • Joomla 3.x UTD v3.18 released: refinements, stability & continued evolution
    Written by  JoomlaWorks
    08 Nov 2026
  • Sunsetting all our Joomla templates
    Written by  JoomlaWorks
    08 Nov 2026
  • Security notice: emails impersonating the K2 developer
    Written by  JoomlaWorks
    15 Oct 2026
  • Joomla 3.x UTD v3.17 now available - a milestone release for this project!
    Written by  JoomlaWorks
    10 Oct 2026
  • Major improvements coming to Joomla 3.x UTD
    Written by  JoomlaWorks
    08 Oct 2026

About Joomlaworks

JoomlaWorks is developing and supporting some of the most respected and popular extensions in the Joomla community, including the groundbreaking K2, AllVideos, Simple Image Gallery (Free & Pro), Frontpage Slideshow, Simple RSS Feed Reader and many more.

Since 2006 we have developed & released more than 40 extensions for the Joomla CMS, all of which have been used in hundreds of thousands of Joomla websites across the world.

Our extensions have been downloaded more than 12 million times, with our flagship extension K2 surpassing 5 million downloads!

Follow Us Social

  • X / Twitter
  • Facebook
  • GitHub
  • GitHub (K2)
  • YouTube

Read Our Feeds

  • Extension Updates
  • Blog
  • Videos
Copyright © 2006 - 2026 JoomlaWorks Ltd.
JoomlaWorks Ltd. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.
designed by Nuevvo