Cpanel disk used incorrect showing unlimited or 0MB

You can fix this by running the script  /scripts/fixquotas

is this doesn’t work and you are using Virtuozzo or OpenVZ you will need to set the QUOTAUGIDLIMIT perimeter – this allows the system to allocate user IDs (UID)

e.g (openvz)

vzctl set 101 –quotaugidlimit 1000 –save

then run the scrip “/scripts/fixquotas”

and it should all work.

Troubleshooting

If you’ve done the above and it still doesn’t work (or the value still says 0MB) this may be due to cPanel caching the disk usage results. to disable this:

Select the following in your WHM.

WHM >> Tweak Settings >> System >> “Disable Disk Quota display caching (WHM will cache disk usage which may result in the display of disk quotas being up to 15 minutes behind the actual disk usage. Disabling this may result in a large performance degradation.)”

Linux slow name resolution (DNS)

source

# vi /etc/modprobe.conf

add to the bottom of file:

alias ipv6 off
alias net-pf-10 off
# reboot

or before you reboot, also check out:

# grep hosts /etc/nsswitch.conf
#hosts:     db files nisplus nis dns
hosts:      files dns

Your /etc/nsswitch.conf should look similar to this:

#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#	nisplus or nis+		Use NIS+ (NIS version 3)
#	nis or yp		Use NIS (NIS version 2), also called YP
#	dns			Use DNS (Domain Name Service)
#	files			Use the local files
#	db			Use the local database (.db) files
#	compat			Use NIS on compat mode
#	hesiod			Use Hesiod for user lookups
#	[NOTFOUND=return]	Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd:    db files nisplus nis
#shadow:    db files nisplus nis
#group:     db files nisplus nis

passwd:     files
shadow:     files
group:      files

#hosts:     db files nisplus nis dns
hosts:      files dns

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files     

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   files

publickey:  nisplus

automount:  files
aliases:    files nisplus



DirectAdmin yum.conf

vi /etc/yum.conf

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php*

How to override open_basedir settings in Plesk

Plesk will overwrite any httpd.conf settings unless you include them in…

/home/httpd/vhosts/DOMAIN/conf/vhost.conf

basically, the instruction everywhere on the web on how to modify the open_basedir for plesk, so it won’t overwrite it, were all wrong…

here’s the instruction from the Plesk website:

http://kb.parallels.com/en/432

<Directory /home/httpd/vhosts/DOMAIN/httpdocs>
php_admin_value open_basedir “/home/httpd/vhosts/DOMAIN/httpdocs:/tmp:/usr/bin:/usr/local/bin”
</Directory>

this didn’t work because the the plesk httpd.include (which gets overwritten each time) used the “IfModule sapi_apache2.c” call, which MUST ALSO be used in the vhost.conf (which overrides)…

here is the correct way of inputing the vhost.conf:

<Directory /home/httpd/vhosts/DOMAIN/httpdocs>
<IfModule sapi_apache2.c>
php_admin_value open_basedir “/home/httpd/vhosts/DOMAIN/httpdocs:/tmp:/usr/bin:/usr/local/bin”
</IfModule>
</Directory>

Adding custom modules to apache for customapache : DirectAdmin

If you want to add any extra modules to apache, they’ll need to be compiled in. Any module that needs to be compiled in will have a –with-module type flag which will need to be used. To add this flag, run the following:

cd /usr/local/directadmin/customapache
vi configure.apache_ssl

#add your –with-module line to the end of the file,
# and make sure the character exists at the end of all lines except the last one.

./build clean
./build apache_mod_ssl

Then restart apache:
RedHat:

/sbin/service httpd restart

FreeBSD:

/usr/local/etc/rc.d/httpd restart

If you run into problems, you may also need to recompile php as well:

./build php

Then restart apache again.

Easy apache error on a VPS – !! Warning (VZ): You are only only guaranteed xx Megabytes of ram! xxx Megabytes is recommended. !!


Easy::Apache v3.2.0 Build 4310

!! Warning (VZ): You are only only guaranteed 224 Megabytes of ram! 512 Megabytes is recommended. !!

If you get above memory error on VPS while running easy apache,  You can fix by using following steps. Login in to main VPS and edit the variable OOMGUARPAGES accordingly.

OR

OpenVZ Users :
You can also modify the
OOMGUARPAGES values from shell as required.  :

vzctl set 101 –OOMGUARPAGES 561120:2147483647 –save

Need Assistance with nominal fee contact [email protected]

How to install Zend Optimizer with the (IonCube) Loader? (RHEL, Plesk)

How to install Zend Optimizer with the (IonCube) Loader?

  1. wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
  2. tar zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
  3. cd ZendOptimizer-3.3.3-linux-glibc23-i386
  4. php -v (Check php version note it down)
  5. php -i | grep php.ini (note down the php.ini path)
  6. httpd -v (Check version)
  7. ./install
  8. After the above it will prompt for various path of apache, php
  9. php -v (if it gives error) “PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0”
  10. Comment the zend in php.ini
  11. nano -w /etc/php.ini
  12. #[Zend]
    #zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    #zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
    #zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    #zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 
    #zend_optimizer.version=3.3.3
  13. Make a zend.ini in /etc/php.d/ directory
  14. copy the zend so to it
  15. [Zend]
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
    zend_optimizer.version=3.3.3
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
  16. restart httpd | /etc/init.d/httpd restart
  17. check the if it is loaded or not php -v
  18. [root@rshagrawal php.d]# php -v
    PHP 4.3.9 (cgi) (built: Sep 12 2007 11:09:31)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with the ionCube PHP Loader v3.1.16, Copyright (c) 2002-2006, by ionCube Ltd., and
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Thats all you are done.

=======================
Reference ::

http://kb.swsoft.com/en/631

 

Need Assistance with nominal fee contact [email protected]

Any operation on a VE gives me “Cannot lock VE”.

Any operation on a VE gives me “Cannot lock VE“.

VE is locked when some operation (backup, migration, start / stop, etc.) with this VE is in progress. You can determine which process is holding VE #111 using the following command on the hardware node:

# cat /vz/lock/111.lck

16824
backing-up

You can kill that process if needed. Make sure that the process is really killed. If there is no process with that PID on the node, just remove the lockfile.

# kill 16824

# vzctl start 111

Service Unavailable error message on a server with Plesk Windows

Plesk Error : Service Unavailable

Error under Event Viewer :

The identity of application pool ‘PleskControlPanel’ is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool. Therefore, the application pool has been disabled.

Try Plesk Reconfigurator > Repair Plesk Installation with checked option Plesk Services this fixed the issue which I faced.

Easy apache error on a VPS – You are only only allowed to use xx Megabytes of ram! xxx Megabytes is required

Sometimes, you can get the following error on VPS while running easy apache. You can fix by simple following steps.

Login in to main VPS and edit the variable PRIVVMPAGES accordingly

/scripts/easyapache
Use of uninitialized value in pattern match (m//) at /var/cpanel/perl/easy/Cpanel/Easy/Utils.pm line 436.
!! Critical Error (VZ): You are only only allowed to use 90 Megabytes of ram! 512 Megabytes is required. !!

You can also modify the privvmpages values from shell as required. (For OpenVZ users) :

vzctl set 101 --privvmpages 850M:900M --save