Wednesday 14 March 2012

Enabling Ping in Windows

Ping results from the source always helps us in troubleshooting the issue with connecting to the server or slow loading time. Here is the list of steps to need to follow to enable Ping in Windows machine.



1) Go to Start

2) Open a command prompt

3) Type in the following: netsh firewall set icmpsetting 8 enable

Test it out, the server should be pingable now!

To disable it again, you give in this command: netsh firewall set icmpsetting 8 disable

OR,

You can enable ping in windows server 2008 by the following method also:

Go to Start >> Administrative Tools >> Windows Firewall with Advanced Security >> Scroll down to "File And Print Sharing (Echo Request - ICMPv4-IN)" (or v6 if you are using ipv6) >> Enable this rule.



Saturday 10 March 2012

Linux Webhosting Solutions: rndc: connect failed: connection refused

Linux Webhosting Solutions: rndc: connect failed: connection refused

rndc: connect failed: connection refused

After starting named with the command /etc/init.d/named start you get an OK but the named server is not running. 

The problem could be that named tries to write to the file /var/run/named.pid . On most Linux/UNIX systems the user named is not allowed to write to that file. Instead the user named should write to /var/run/named/named.pid
Solution:
Open /etc/named.conf and add pid-file "/var/run/named/named.pid" to the "options" section.
If you run rndc-confgen you should add the pid-file section yourself. 

# Use with the following in named.conf, adjusting the allow list as needed:


options {
 pid-file "/var/run/named/named.pid";
}
key "rndc-key" {
      algorithm hmac-md5;
      secret "DTKqPmkyorw5dFYCyz6Fiw==";
};
controls {
      inet 127.0.0.1 port 953
              allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

Friday 9 March 2012

Linux Webhosting Solutions: modfcgid: MaxRequestLen

Linux Webhosting Solutions: modfcgid: MaxRequestLen

modfcgid: MaxRequestLen

Issue:

Unable to upload files in Joomla, Wordpress etc:

 $ tail -f /usr/local/apache/logs/error_log |grep domianname.com
[Thu Oct 06 12:57:28 2011] [warn] [client 203.197.151.138] mod_fcgid: HTTP request length 131274 (so far) exceeds MaxRequestLen (131072), referer:
http://domainname.com/wp-admin/media-new.php?flash=0                                                                             
[Thu Oct 06 12:57:28 2011] [error] [client 203.197.151.138] File does not
exist: /home/domain/public_html/500.shtml, referer:
http://
domainname.com/wp-admin/media-new.php?flash=0


Fix:

Find the FCGI PHP configuration file for the domain under concern. Usually it is /usr/local/apache/etc/userdata/std/2/<username>/<domainname>/phpini.conf
Add line "MaxRequestLen 15728640" inside the configuration file. Restart Apache
 
For this domain, the fix was:
-> $ vi /usr/local/apache/etc/userdata/std/2/domian/domainname.com/phpini.conf
-> Modify the contents to as follows:
Code: Select all
 
 <IfModule mod_fcgid.c> 
 AddHandler fcgid-script .fcgi 
 FcgidConnectTimeout 20 
MaxRequestLen 15728640 
</IfModule>
-> $ service httpd restart
 

Saturday 3 March 2012

PHP Fatal error: Class ‘Memcache’ not found in


PHP Fatal error: Class ‘Memcache’ not found in

This is the general PHP error that occurs in the website when the Memcache module is missing. Thinking to install memcache via easy apache. Really it is a bad idea.

I too tried to install memcache module via easyapache. Every time in the easy apache it shows the memcache is enables. However, once the the compiling is complete, memcache module is not compiled in the php.

What is the solution for this error "PHP Fatal error: Class ‘Memcache’ not found in '/home/user/hemanth/php.ini' ?

The only solution is to compile memcache module via source and add the link in the php.ini. Just follow the steps below to compile memcache module in the server.


Step 1 – Download memcache



mkdir repo
cd repo
wget http://pecl.php.net/get/memcache-3.0.6.tgz
tar -xvfz memcache-3.0.6.tgz




Step 2 – Compilation & installation

cd memcache-3.0.6
phpize
you should see something like this;
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
./configure
make
make install



Step 3 – Load in php.ini
Enable memcache in php.ini.

echo "extension=memcache.so" >> /usr/local/lib/php.ini
service httpd restart





++++++++++++++++++++++++++++++


This is how it will look like when you try to install the Memcache in the cPanel.


root@server [~]# mkdir repo
root@server [~]# cd repo
root@server [~/repo]# wget http://pecl.php.net/get/memcache-3.0.6.tgz
--2012-02-29 17:03:30--  http://pecl.php.net/get/memcache-3.0.6.tgz
Resolving pecl.php.net... 76.75.200.106
Connecting to pecl.php.net|76.75.200.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 54717 (53K) [application/octet-stream]
Saving to: `memcache-3.0.6.tgz'

100%[===================================================================================>] 54,717      16.9K/s   in 3.2s   

2012-02-29 17:03:34 (16.9 KB/s) - `memcache-3.0.6.tgz' saved [54717/54717]

root@server [~/repo]#

root@server [~/repo]# tar -zxvf memcache-3.0.6.tgz
package.xml
memcache-3.0.6/config.m4
memcache-3.0.6/config9.m4
memcache-3.0.6/config.w32
memcache-3.0.6/CREDITS
memcache-3.0.6/example.php
memcache-3.0.6/memcache.c
memcache-3.0.6/memcache_pool.c
memcache-3.0.6/memcache_queue.c
memcache-3.0.6/memcache_session.c
memcache-3.0.6/memcache_ascii_protocol.c
memcache-3.0.6/memcache_binary_protocol.c
memcache-3.0.6/memcache_standard_hash.c
memcache-3.0.6/memcache_consistent_hash.c
memcache-3.0.6/memcache.dsp
memcache-3.0.6/php_memcache.h
memcache-3.0.6/memcache_pool.h
memcache-3.0.6/memcache_queue.h
memcache-3.0.6/README
memcache-3.0.6/memcache.php
root@server [~/repo]#
root@server [~/repo]# cd memcache-3.0.6
root@server [~/repo/memcache-3.0.6]# phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
root@server [~/repo/memcache-3.0.6]#
root@server [~/repo/memcache-3.0.6]# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
root@server [~/repo/memcache-3.0.6]# echo "extension=memcache.so" >> /usr/local/lib/php.ini
root@server [~/repo/memcache-3.0.6]#
root@server [~/repo/memcache-3.0.6]# service httpd restart
root@server [~/repo/memcache-3.0.6]#
root@server [~/repo/memcache-3.0.6]#
root@server [~/repo/memcache-3.0.6]#
root@server [~/repo/memcache-3.0.6]# php -i |grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
root@server [~/repo/memcache-3.0.6]#
root@server [~/repo/memcache-3.0.6]# php -m |grep memcache
memcache
root@server [~/repo/memcache-3.0.6]#
















Thursday 1 March 2012

How to install Fantastico on cPanel/WHM

How to install Fantastico on cPanel/WHM ?

Just follow the steps below to install Fantastico in cPanel.

 SSH to the server at the back end. Then execute the following command

1) cd /usr/local/cpanel/whostmgr/docroot/cgi
2) wget -N http:// files.betaservant.com/files/free/fantastico_whm_admin.tgz
3) tar -xzpf fantastico_whm_admin.tgz
4) rm -rf fantastico_whm_admin.tgz

Now login to WHM.

5) Go to Plugins, you can see an option called "Fantastico De Luxe WHM Admin"

Click on that an proceed installing the Fantastico.

In case, if you get any error when you click on "Fantastico De Luxe WHM Admin" then just do the following in the server.

chmod -R 0755 /usr/local/cpanel/3rdparty/etc/ixed



After the installation is complete, click on "Settings" and go through the settings. While some settings are not important, some other (marked below with an *) are essential for a proper functioning of Fantastico installations.
Language: Select the language for the admin backend AND default language for users without a language selected.
Email notifications: Enter an email address in order to receive notifications when users perform installations using Fantastico.
Master files settings (*): If you are not an advanced user who modifies the master files, leave this to "Remove". Change this only if you know what you are doing
PHPsuexec (*): VERY ESSENTIAL!!! Changing this value will not install or de-install phpsuexec for you. It will only tell Fantastico that you have phpsuexec installed or not installed on your server. Change to "installed" if you perform installations which produce an "Internal Server Error". Notice: Changes will not apply to existing installations! You have to re-install in order to have working installations.
Path to netPBM: Enter the full path to the netPBM binaries in order to enable Gallery installations. As long as this field has no value, your users will not be able to install Gallery.
Select Fantastico licensing and files server: If the Fantastico pages take long to load switch to the server that works best for you. Fantastico will auto-switch if connections time out.
Update preference: Select latest version (sometimes experimental) or stable version (best working).






If your users don't see a Fantastico link in their CPanel: Go to WHM and edit the "default" Features List. Activate Fantastico.


If the issue still persist, kindly follow the link below

http://forums.cpanel.net/f42/installing-fantastico-77742.html