Thursday, October 6, 2011

http is not running

Apache not running, httpd is down
[~]# service httpd restart
httpd not running, trying to start


Then i have checked the http error lod and found the following error

[Wed Oct 25 00:00:00 2011] [error] (17)File exists: Cannot create SSLMutex with file `/usr/local/apache/logs/ssl_mutex'
Configuration Failed

Solution:
cd /usr/local/apache/logs/
mv ssl_mutex ssl_mutex_ajeesh
service httpd restart

This fixed my issue.

Sunday, September 11, 2011

mail sending failed

2011-09-10 16:30:09 lowest numbered MX record points to local host: tuxunited.com (while verifying from host mail-yx0-f179.google.com [125.12.125.125])
2011-09-10 16:30:10 H=mail-yx0-f179.google.com [125.12.125.125] F= temporarily rejected RCPT >: lowest numbered MX record points to local host

Solution:

First need to remove the particular domain name from

/etc/remotedomains

and add the domain name in

/etc/localdomains

That is all fixed my issue

Tuesday, September 6, 2011

can not use due to limits - cpanel package

For cpanel new package create you will throw out some error like
"can not use due to limits"

This is mainly when you are trying to add some unlimited package.

So please note that for unlimited package add do not use "unlimited" instead of that use "99999" like that. This fixed my issue.

Softaculous error (Solved) - vtiger

Softaculous error
Installation package could not be found.

This error i got with vtiger installation.

cd /var/softaculous/

I have found that vtiger folder is not gave vtiger.zip file. I have copy that particular folder "vtiger" from another server and fixed my issue.

Saturday, August 20, 2011

Easy Apche can not run

A.
!! Creating backup of working apache in '/usr/local/apache.backup'. !!
!! Symlink encountered (/usr/local/apache/etc), preserving target (conf)... !!
!! Backup of working apache complete. !!

!! Start: Silent httpupdate request !!


!! End: Silent httpupdate request !!

Checking that all tarballs are present and up to date.
Checking that all packages are present and up to date.
!! Trying to auto repair package system !!
!! Package system can not be repaired automatically !!
!! Please visit http://www.cpanel.net/support/could_not_ensurepkgs.htm for help with this error. !!
!! Restoring original working apache !!
!! Executing '/scripts/initsslhttpd' !!
!! Restarting 'httpd' ... !!
!! 'httpd' restart complete. !!
Building global cache for cpanel...Done
!! Executing '/scripts/initfpsuexec' !!
!! Executing '/scripts/initsslhttpd' !!
!! Executing '/scripts/update_apachectl' !!
Compiling report...
Sending report. As some of the attached files may be quite large, this could take a few minutes. Thanks for your patience.
!! If you want to create a support ticket with cPanel regarding this please reference 'BuildAP Report Id': '6207501' !!
Report processed.
!! Feel free to submit a support ticket at https://tickets.cpanel.net/submit/index.cgi?reqtype=tickets !!
!! Verbose logfile is at '/usr/local/cpanel/logs/easy/apache/build.1313811394' !!

While yum update

root@server [/]# yum update
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib64/python2.4/threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

But for the
yum --disableplugin=fastestmirror update
Worked for me

So i have increased the RAM for my server and tried the easy apache fixed my issue

B. bash-3.2# /scripts/easyapache
Can't locate CDB_File.pm in @INC (@INC contains: /usr/local/cpanel /var/cpanel/perl/easy /scripts /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8 8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_per rl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/local/cpanel/Cpanel/Locale/Uti ils.pm line 12.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/Locale/Utils.pm line 12.
Compilation failed in require at /usr/local/cpanel/Cpanel/Locale.pm line 17.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/Locale.pm line 17.
Compilation failed in require at /usr/local/cpanel/Cpanel/Template.pm line 40.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/Template.pm line 40.
Compilation failed in require at /usr/local/cpanel/Cpanel/AdvConfig.pm line 9.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/AdvConfig.pm line 9.
Compilation failed in require at /var/cpanel/perl/easy/Cpanel/Easy/Utils/HttpdConf.pm line 11.
BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Utils/HttpdConf.pm line 11.
Compilation failed in require at (eval 32) line 3.
...propagated at /usr/local/lib/perl5/5.8.8/base.pm line 85.
at (eval 30) line 3
at /var/cpanel/perl/easy/Cpanel/Easy.pm line 18
BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy.pm line 18.
Compilation failed in require at (eval 1) line 3.
...propagated at /usr/local/lib/perl5/5.8.8/base.pm line 85.
BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Apache.pm line 8.
Compilation failed in require at /scripts/easyapache line 23.

Solution : Upgrade the cpnale /scripts/upcp --force

Sunday, August 14, 2011

memcache installation

Installing Memcache in Cpanel server/ Linux Servers

Memcache is a memory caching system to get the memory for where you required more and it used your system memory to a better way

First we need to install the libeven. This API will helps to execute a callback functon when a specific event accure. This is useful when there is a timeout is occured for a particular process.

Installtion is covered in three steps

Step 1: Libevent
#cd usr/src/
#wget http://monkey.org/~provos/libevent-2.0.12-stable.tar.gz
#tar -xvf libevent-2.0.12-stable.tar.gz
#cd libevent-2.0.12-stable
#./configure
#make
#make install
: You have to note down the libeven installation location from the above installation. In most cases this will be on /usr/local/lib
Then you need to update the libeven shared libraries for that we want to edit the /etc/ld.so.conf.d
#vi /etc/ld.so.conf.d/libevent.conf --> /usr/local/lib
write and quit from this file
and execute the command
#ldconfig
# ldconfig -v |grep libevent
ibevent_pthreads-2.0.so.5 -> libevent_pthreads.so
libevent_openssl-2.0.so.5 -> libevent_openssl.so
libevent_core-2.0.so.5 -> libevent_core.so
libevent_extra-2.0.so.5 -> libevent_extra.so
libevent-2.0.so.5 -> libevent.so

Step 2 : memcache

Now we can install memcache
#cd /usr/src
#wget http://memcached.googlecode.com/files/memcached-1.4.6.tar.gz
#tar -xvf memcached-1.4.6.tar.gz
#cd memcached-1.4.6
#./configure
#make
#make install
You can confirm the memcache is stalled on your server using the command
#which memcached

Step3: Memcache for php module

#cd /usr/src
#wget http://pecl.php.net/get/memcache-2.2.6.tgz
#tar -xvf memcache-2.2.6.tgz
#cd memcache-2.2.6
#phpize
#./configure
#make
#make install
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
Now we need to edit the php.ini for the memcache exention. Please confirm the above locaton is your default extension extension_dir. For my this is the same location in my php.ini
So I have added the line [ extension = "memcache.so" ] without the [ ] symbols.
write and quite the php.ini file and restarted the apache server
#/scripts/restartsrv_httpd
Now we can confirm memcache php module has been installed or now using the command
#php -m | grep memcache
and aso touch a info.php file and check the memcache module is listed or now

Thats it you have finished ...

Friday, August 5, 2011

Wordpress timthumb.php Vulnerability

There is a major security vulnerability reported for the wordpress web sites.


This is using the unauthorised themes and plugins from the internet. timthumb.php vulnerability allow your web site visitors to upload files. This vulnerability is insecure , platform independent . This is due to the authors include the script using without any security measures.


Fix -1

1. remove the file named timthumb.php

2. we can find out this using the command " find . -name ‘timthumb.php "

OR

1. change the permission to 000 " chmod 000 timthumb.php "

Fix -2:This is the best way:

By editing the file name we can fix this issue

a.vi timthumb.php

b. Go to line 27

c. Change it to remove all the sites listed like “blogger.com” and “flickr.com”. Once you’re done the line should look like this $allowedSites = array();