Articles in the ‘cPanel’ Category

How to install EPEL repository cPanel CENTOS?

Thursday, August 4th, 2011

1.Download the latest EPEL repository for I386
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

2. Download the latest EPEL repository for x86_64
wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm

3. Run the rpm install command
rpm -Uvh epel-release-5*.rpm

If you want to change the priority of the repository edit this file :
/etc/yum.repos.d/epel.repo
And change this value :
priority=2

How to add MSSQL support in PHP5 cPanel CENTOS

Thursday, June 2nd, 2011

If you want to add MSSQL support in PHP5 cPanel CENTOS, follow the next steps:

1. First, we need to install FreeTDS
wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
tar -zxvf freetds-stable.tgz
cd freetds-*

2. Begin the configuration process:
./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld

Note
Use tdsver=8.0 if you have SQL 2000/2005, tdsver=7.0 if you have SQL 7.0….

3. Compile FreeTDS
make && make install

4. Add the following line in the file /etc/ld.so.conf :
include /usr/local/freetds/lib

5. Run the following command
ldconfig -v

6. Add mssql to compile options of EasyApache
nano /var/cpanel/easy/apache/rawopts/all_php5
and add:
--with-mssql=/usr/local/freetds

7. Run /scripts/easyapache or build it from WHM. You don’t need to select any additional options here. Just build it. Once the build completes, you should now be able to use PHP’s MSSQL connector functions.

Note
If you are running a 64bit OS and get an error about configure: error:
Could not find /usr/local/freetds/lib64/libsybdb.a|so
then you need to do the following:


ln -s /usr/local/freetds/lib/libsybdb.so.5 /usr/lib64/libsybdb.so.5
ln -s /usr/local/freetds/lib/libsybdb.so.5 /usr/local/freetds/lib64/libsybdb.so
ldconfig -v

Internal Server Error Mailman cPanel

Wednesday, May 18th, 2011

If you have

Internal Server Error

while accessing :

http://SITE-URL/mailman/admin/LIST-NAME

you have to fix some permission problems in the mailman.

chmod 02755 -R /usr/local/cpanel/3rdparty/mailman
/usr/local/cpanel/3rdpart/mailman/bin/check_perms -f
chmod 02775 -R /usr/local/cpanel/3rdparty/mailman/logs

That’s it!

Using eAccelerator with cPanel and FASTCGI

Tuesday, March 8th, 2011

If you want to use eAccelerator with cPanel and Apache, disable suPHP through easyApache or you will have “Cached Scripts 0″ in control panel of eAccelerator.

Same rule applies with APC.

APC fails to install via WHM in cPanel

Monday, March 7th, 2011

If you try to install APC via WHM in cpanel and you get:

cpanel /usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory

then you need to install PCRE-devel.

Follow the next step

Go to / and type

yum install pcre-devel

Now, go back to WHM and try to install again PCRE.

Install ImageMagick and Imagick on Cpanel Server

Thursday, December 23rd, 2010

Installation

ImageMagick
Check first if it’s installed:

/scripts/checkimagemagick

Proceed with Installation:
/scripts/installimagemagick
Installation will take a couple minutes as it will install other packages needed by ImageMagick. After the installation, you can check your ImageMagick version:
/usr/bin/convert --version
It will give you something like:

Version: ImageMagick 6.4.8 2009-05-11 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

Imagick
Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button – that’s all.

Uninstall
If you decide to uninstall it’s as easy as the installation process:

ImageMagick
/scripts/cleanimagemagick

Imagick
WHM -> Software -> Module Installers -> PHP Pecl (manage). Click on Uninstall button for Imagick.

How to install PECL uploadprogress for Drupal?

Friday, December 17th, 2010

Installing from cPanel will mostly sure fail. If you want a quick fix, here is how to do it.

Download the latest uploadprogress package from here
wget http://pecl.php.net/get/uploadprogress-1.0.1.tgz
tar xvfz uploadprogress-1.0.1.tgz
cd uploadprogress-1.0.1
phpize
./configure
make
make install

Edit /usr/local/lib/php.ini
nano /usr/local/lib/php.ini
and copy paste at the end of the file:
extension=uploadprogress.so
and at last, restart Apache:
service httpd restart

Faster PHP with NGINX and cPanel

Thursday, October 28th, 2010

If you followed our howto’s on NGINX and cPanel here is another improvement you can do in /usr/local/nginx/conf/vhost.conf


# serve the app via fastcgi
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php-fastcgi.sock;
fastcgi_index index.php;
fastcgi_read_timeout 240;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}

Problems NGINX imagecache and Drupal

Thursday, October 28th, 2010

If you have problems displaying images generated via imagecache on Drupal you nee to add in /usr/local/nginx/conf/vhost.conf

location ^~ /sites/default/files/imagecache/ {
index index.php index.html;

# assume a clean URL is requested, and rewrite to index.php
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
break;
}
}

Errors in installing PECL extensions through cPanel WHM

Friday, October 22nd, 2010

If you get:

checking for C compiler default output file name... conftest.in
checking whether the C compiler works... configure: error: cannot run C compiled programs.

This happens when /tmp mounted with the ‘noexec’ option


mount -o,remount,rw,exec /var/tmp

And when you’re done, set it back:

mount -o,remount,rw,noexec /var/tmp