Archive for the ‘cPanel’ Category



Mailman problem on cPanel dedicated server

Wednesday, June 30th, 2010

While installing or modifying mailinglist on cPanel server if you get the following error:

Bug in Mailman version 2.1.11

We're sorry, we hit a bug!
If you would like to help us identify the problem, please email a copy
of this page to the webmaster for this site with a description of what
happened. Thanks!

To get this fixed, you can execute following command :

root# chmod 02775 -R /usr/local/cpanel/3rdparty/mailman/

That’s it!

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Delete an IP address from linux cPanel dedicated server

Thursday, December 10th, 2009

Normally, to delete an IP from a cPanel server you can login to WHM and remove the IP using the function “Show or delete current IP address” under “IP functions” or use linux command.

For some reason we were having problems with the datacenter and we were asked to remove the IP using KVM. In this case, we entered the KVM and checked the if the IP was listed on the server by using ifconfig – we found that the IP was listed there. To remove the IP edit the file.

root@server# nano /etc/ips

and now remove the line of the IP and then restart the ipaliases service by the command

root@server# service ipaliases restart

It will show failed, you can ignore those warnings. And you can recheck if the IP has gone by using the command ifconfig. You’ll see the IP is not seen in the ifconfig output. Now, you can ask the datacenter to get the server online and then if you check from the WHM you will see that the IP is not available there.

That’s it!

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Uninstall fantastico on cPanel dedicated server

Sunday, August 30th, 2009

While installing fantastico we had issues with wget as you know this is well-known issue of fantastico. Once it was installed , but it was not successful. So, we decided to uninstall fantastico from this dedicated cPanel server and do a fresh installation of fantastico.

Below are the path where fantastico on your cPanel server, you can us the command “rm –rf <filename>” to delete the fantastico files and directories.

Once you have logged in SSH of your cPanel server with root logins, you can follow the below commands:

rm -rf /var/netenberg/
rm -rf /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/
rm -rf /usr/local/cpanel/3rdparty/fantastico*
rm -rf /usr/local/cpanel/base/frontend/*/fantastico
rm -f /usr/local/cpanel/base/frontend/x/cells/fantastico.html
rm -f /usr/local/cpanel/whostmgr/docroot/cgi/addon_fantastico.cgi

Now, you can proceed for a fresh installation of fantastico. I believe you know the steps to install fantastico. If not, we can help you with it.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Install PDFlib PHP on cPanel Dedicated server

Saturday, June 27th, 2009

One web developer contacted us and requested us to install PDFlib on their cPanel dedicated server which has PHP 5. As you must be knowing that PDFlib is not supported in the current cPanel easyapache, and especially with PHP 5 so we installed PDFlib Lite manually for him. Here is how we had installed it for them:

Download the pacakge, their official site is www.pdflib.com

root@server# wget http://www.pdflib.com/binaries/PDFlib/703/PDFlib-Lite-7.0.3.tar.gz
root@server#  tar xvzf PDFlib-Lite-7.0.3.tar.gz
root@server#  cd PDFlib-Lite-7.0.3
root@server#  ./configure --prefix=$HOME/usr --without-java
root@server#  make
root@server#  make install

Once this is done, we built PDFlib DSO by the below commands:

root@server#  cd ~/tmp
root@server#  pecl download pdflib
root@server#  tar xvzf pdflib-*.tgz
root@server#  cd pdflib-*
root@server#  phpize
root@server#  ./configure --with-pdflib=$HOME/usr
root@server#  make
root@server#  make test

Then, copied the PDFlib extensions to a seperate directory:

root@server#  cd ~
root@server#  mkdir extensions
root@server#  cp ~/tmp/pdflib-*/modules/pdf.so ~/extensions

Added the extensions in the php.ini using the below steps:

root@server#   php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

Add the below line in php.ini

root@server#  nano /usr/local/lib/php.ini

extension_dir = "/root/extensions"
extension = "pdf.so"

Save php.ini file
Create a test PHP file under your domain to check if it works, below is the test code:


<?php

try {
$p = new PDFlib();

/*  open new PDF file; insert a file name to create the PDF on disk */
if ($p->begin_document(“”, “”) == 0) {
die(“Error: ” . $p->get_errmsg());
}

$p->set_info(“Creator”, “hello.php”);
$p->set_info(“Author”, “Rainer Schaaf”);
$p->set_info(“Title”, “Hello world (PHP)!”);

$p->begin_page_ext(595, 842, “”);

$font = $p->load_font(“Helvetica-Bold”, “winansi”, “”);

$p->setfont($font, 24.0);
$p->set_text_pos(50, 700);
$p->show(“Hello world!”);
$p->continue_text(“(says PHP)”);
$p->end_page_ext(“”);

$p->end_document(“”);

$buf = $p->get_buffer();
$len = strlen($buf);

header(“Content-type: application/pdf”);
header(“Content-Length: $len”);
header(“Content-Disposition: inline; filename=hello.pdf”);
print $buf;
}
catch (PDFlibException $e) {
die(“PDFlib exception occurred in hello sample:\n” .
“[" . $e->get_errnum() . "] ” . $e->get_apiname() . “: ” .
$e->get_errmsg() . “\n”);
}
catch (Exception $e) {
die($e);
}
$p = 0;
?>

You need to get the below output in PDF format within your browser.

Hello world!
(Says PHP)

Let us know if this was helpful for you?

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Zen cart smtpauth gmail configuration port 465 issue on cPanel VPS

Tuesday, June 16th, 2009

On a ecommerce website which had zen cart, in the “email options” the email address set was a free gmail account. When configured email address as per zen cart documentation we were facing error – where it said :

SMTP Error: Could not connect to SMTP server.

Settings in Zen cart:

E-Mail Transport Method : smtpauth
E-Mail Linefeeds : LF
Use MIME HTML When Sending Emails : true
Verify E-Mail Addresses Through DNS : false
Send E-Mails : true
SMTP Server Host Address tls://smtp.gmail.com or smtp. gmail.com: smtp gmail.com
SMTP Server Port Number : 465
SMTP Authentication Required : true
SMTP Authentication Username your@domain.com or you@ gmail.com : someaccount@gmail.com
SMTP Authentication Password your password : my password

From the server the connection to gmail SMTP was perfect:

root@server [~]# telnet smtp.gmail.com 465

Trying 74.125.79.109...

Connected to smtp.gmail.com (74.125.79.109).

Escape character is '^]'.

So, the connection from server was perfect. But, from zen cart it was not connecting.

Solution:

OpenSSL was not available in PHP. So, we recompiled PHP with OpenSSL support and everything worked just great.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


session.save_path error php.ini on cpanel VPS

Monday, May 18th, 2009

While installing a third party product on a cPanel VPS , we came around an error:

The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.

To get this fixed, we have done the following:

Find the php.ini file

php -i | grep php.ini
Configuration file (php.ini) => /etc/php.ini

When checked the session.save_path it was not set, it was then set to /tmp.

session.save_path  = "/tmp"

And, all worked fine.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Hostname A entry missing in cpanel.

Wednesday, April 1st, 2009

Whenever you get a cPanel dedicated server or a VPS cPanel server from your service provider once cPanel is setup, you may come around an error “Your hostname A entry is missing”

This comes with a popup, you can click on the Add button within the popup. This will add A entry for your hostname.

You can check this in the DNS zone of the hostname. Which can be found at this path: /var/named/your.hostname.db

That’s it!

If you need to change hostname of your server, you can check it here.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Install cPanel on a dedicated server

Wednesday, January 21st, 2009

You have a fresh linux dedicated server from your data center and need to install cpanel on the server, to do so proceed with the following steps:

Login to your dedicated server as root

root# wget http://layer1.cpanel.net/latest
root# sh latest

Once installed access the server in your favourite browser by:

http://your-server-IP:2086

Follow the steps to get it setup properly.

That’s it!

Once cPanel is installed on your dedicated server, you must be thinking of migrating accounts from your old cpanel server to this new cpanel server. Isn’t it? For this you can check Hosting account migration manually on cpanel server – other than this the migration can also be done from cpanel to cpanel using copy accounts function.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


cPanel : Unactivated License File

Monday, January 19th, 2009

On your cPanel dedicated server you must have come across the error:

Unactivated License File

To get this fixed do the following:

Login to your web server as root, once you’re in the console execute the below command:

/usr/local/cpanel/cpkeyclt

This will fix the issue, considering that your dedicated cPanel server IP has a valid cPanel license.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


No space left on device: Couldn’t create accept lock – cPanel Apache server

Sunday, December 21st, 2008

On a cPanel dedicated server, apache server failed to start. So, while checking the apache logs found this:

==> /usr/local/apache/logs/error_log <==

[Sat Dec 20 01:12:27 2008]
[notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)

[Sat Dec 20 01:12:27 2008]
[warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Dec 20 01:12:27 2008]
[emerg] (28)No space left on device: Couldn't create accept lock

Solution:

First of all make sure your server is not out of space. This can be checked with the command:

root# df –h

Now, to check how many semaphores are currently in use the command is:

root# ipcs -s

When the apache (httpd) is stopped, to kill the semaphores ID the command is:

root# ipcrm –s <sem-id>

To kill all the semaphores ID , you can achieve this by doing it in a for loop, the command is:

root# for semid in `ipcs -s | grep nobody | cut -f2 -d" "`; do ipcrm -s $semid; done

Note: “nobody” is apache user.

Now start apache with the command:

root# service httpd restart

This has fixed the issue for us.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.