JoomlaWorks

Member Dashboard
  • Home
  • Extensions
    • Commercial
      • Frontpage Slideshow
      • K2 Plugin for sh404SEF
      • Simple Image Gallery Pro
      • SocialConnect
    • 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)
      • TinyLetter Subscribe
      • URL Normalizer
      • User Extended Fields for K2
  • Templates
    • Commercial Templates
      • Anagram
      • Archetype
      • BusinessOne
      • Ibento
      • Janaro
      • Kiji
      • Matchbox
      • nuMuzik
      • RadioWave
      • Toreda
    • Free Templates
      • nuModusVersus
      • Takai
  • Demos
    • Joomla Extension Demos
    • Joomla Template Demos
    • WordPress Plugin Demos
  • Labs
    • 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
      • SocialConnect
    • Documentation for Joomla Templates
      • General Resources
        • Installation
        • Content
        • Customization
      • Commercial Templates
      • Free Templates
    • Get Help
      • Community Forum
        • Recent Topics
        • Categories
        • Create free account
      • Help Desk
      • Contact us by e-mail
      • Contact us on Facebook Messenger
      • Contact us on Twitter
  • About
    • Blog
    • Company
    • License & Terms of Service
    • Privacy Policy
  • My Account
Displaying items by tag: whm
Subscribe to this RSS feed
Install APC/APCu on a WHM/cPanel server the easy way and boost your site's performance!

Install APC/APCu on a WHM/cPanel server the easy way and boost your site's performance!

inBlog
If you run a popular Joomla (or WordPress, Drupalor or any other PHP based CMS) website on either a dedicated server or VPS running WHM/cPanel, chance is you may have stumbled upon performance issues at some point.

Although improving Joomla's performance is a task that requires in-depth analysis, I thought I'd just write a couple of words on improving one aspect of your site's performance quickly and efficiently: PHP execution by using the APC or APCu opcode caching modules. Keep in mind that APC is compatible with PHP up to version 5.3.x. APCu replaces APC for PHP versions 5.4.x or newer and it's currently under active development.

Since PHP 5.3.x is considered obsolete, I'll cover the steps to have APCu installed on your server. If you run PHP 5.3.x either consider updating to 5.5.x/5.6.x or follow the steps below making sure you replace any "apcu" reference with just "apc" (minus the "u").

MORE INFO

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

inBlog

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!

MORE INFO
BY MAIL BY RSS

Archives

  • May 2024 (1)
  • March 2023 (1)
  • January 2022 (1)
  • July 2021 (2)
  • May 2021 (1)
  • February 2021 (1)
  • December 2020 (1)
  • September 2020 (1)
  • June 2020 (1)
  • May 2020 (1)
  • February 2020 (1)
  • January 2020 (5)

Tag Cloud

allvideos announcement apache community development frontpage slideshow future joomla k2 Performance plugin release sh404sef simple image gallery simple image gallery pro simple rss feed reader socialconnect tips update video

Latest Entries

  • K2 will not be made available for Joomla 4/5 - change of course
    Written by  JoomlaWorks
    30 May 2024
  • New free extension release: Quick Menu (for Joomla 4)
    Written by  JoomlaWorks
    06 Mar 2023
  • Simple Image Gallery (free) v4.2 released
    Written by  JoomlaWorks
    07 Jan 2022
  • Simple Image Gallery Pro v3.9.1 released (bug-fix release)
    Written by  JoomlaWorks
    26 Jul 2021
  • Simple Image Gallery Pro v3.9.0 released
    Written by  JoomlaWorks
    05 Jul 2021

Join Our Newsletter

Enter your e-mail address to subscribe to our new or updated product notifications. We send combined newsletters, so we won't spam you every week :)

Get Social

  • Twitter
  • GitHub
  • Facebook
  • GitHub (K2)
  • YouTube
  • Speaker Deck

Grab Our Feeds

  • Extension Updates
  • Blog
  • Videos
  • Presentations
Copyright © 2006 - 2025 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