December 25, 2009 | Posted by
admin | Category: cPanel Management
How to install Zend Optimizer on a cPanel server?
cPanel offers ‘phpextensionmgr’ script through which you can install various extensions. To list the available PHP extensions, execute the command as root
root@server [~]# /scripts/phpextensionmgr list
Available Extensions:
EAccelerator
IonCubeLoader
Zendopt
SourceGuardian
PHPSuHosin
To list the available Options and Actions, execute
root@server [~]# /scripts/phpextensionmgr –help
Usage:
phpextensionmgr [options] [action] [extension]
Options:
–help Help message
–prefix Installation prefix for PHP (normally /usr/local or /usr/local/php4)
Actions:
install Install or update the extension
uninstall Uninstall the extension
status Display the installation status of the extension
list Show available extensions
To install Zend Optimizer, execute the command
root@server [~]# /scripts/phpextensionmgr install Zendopt
To verify whether Zend Optimizer is installed, execute:
root@server [~]# php -v
You can install the other available extensions using the same command, just replace ‘Zendopt’ with the extension name you wish to install.
To remove ‘Zend Optimizer’ from the server, just execute
root@server[~]# /scripts/phpextensionmgr uninstall Zendopt
Or
Edit the php.ini file and comment the line that states
zend_extension=”/path/to/ZendOptimizer.so”
under the ‘[Zend]’ section. In this case, make sure you restart the httpd service for the changes to take affect.
Comments Off on How to install Zend Optimizer on a cPanel server?
December 21, 2009 | Posted by
admin | Category: cPanel Management
Error:
There was a problem creating the addondomain.
Sorry, you are not allowed to add any more than (0) addon domains! The domain below was not setup.
Reason:
The domain is not allowed to host any add-on domains on it and the addon domain resources are set to zero by the administrator of the server. You won’t be able to add add-on domain OR park domain from cPanel and receives the “Sorry, you are not allowed to add any more than (0) addon domains!” error message.
Solution:
You need to change add-on domain resources from zero (0) to 1 or more. There are 2 methods to increase the add-on domains for an account:
1) Login to WHM as root, goto Account Functions >> Modify an Account >> select the domain name from the domain’s list and click ‘Modify’ >> specify the number of add-on domains in “Max Addon Domains” text box >> click Save.
2) Login to your server as root. Edit the users file
pico /var/cpanel/users/username
set the MAXADDON from zero to 1 or more
MAXADDON=1
Save the file and update the cache using
/scripts/updateuserdomains
Comments Off on Not allowed to add any more than (0) addon domains!
December 18, 2009 | Posted by
admin | Category: cPanel Management
If you are looking to change the Ftp port on your server from 21 to a non-standard port say 2121, you need tweak the ‘bind’ option in the Ftp configuration file. On a cPanel server with pure-ftp as a Ftp server, you need to edit the pure-ftpd.conf file
# pico /etc/pure-ftpd.conf
Search for the line:
# Bind 127.0.0.1,21
and add the following line below it
Bind *,2121
where, 2121 is the new port you want the Ftp server to listen to.
Save the Ftp configuration and restart the ftp service.
# service pure-ftpd restart
Using the netstat command you can check if the new port is in ‘LISTEN’ state
# netstat -al | grep 2121
If your server is behind a firewall, you will have to open the new Ftp port in the allowed list. For example, if you have CSF firewall installed on your server, edit the configuration at
# pico /etc/csf/csf.conf
and replace port 21 with 2121 in the TCP_IN. Save the file and restart the csf firewall
# csf -r
Comments Off on Howto: Change the FTP port to a non-standard port?
December 12, 2009 | Posted by
admin | Category: cPanel Management
Account Creation Status: failed (Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses. (Unable to find an ip address.) )
You receive the “Account Creation Status: failed” error message while adding a domain from WHM >> Account Functions >> “Create a New Account” option which states that there is no free IP address to assign to your new domain.
The package you are using while adding a domain has the “Dedicated IP” option enabled which searches for a free IP on the server and tries to assign to the every new domain you create. To overcome the issue, you will have to deselect the “Dedicated IP” option from the package which can be achieved via ssh.
Edit the package file located under /var/cpanel/packages
# vi /var/cpanel/packages/packagename
Search for
IP=y
and replace it with
IP=n
Save the file. You should now be able to create an account from WHM successfully.
Comments Off on Account Creation Status: failed (out of available ip addresses)
December 3, 2009 | Posted by
admin | Category: cPanel Management
How to change cPanel theme for multiple accounts?
The cPanel theme for an account is specified in the /var/cpanel/users/username file in the format
RS=value
For example:
BWLIMIT=unlimited
DEMO=0
DNS=domainname.com
FEATURELIST=default
HASCGI=1
IP=IPHERE
LANG=english
LOCALE=en
MAXADDON=0
MAXFTP=0
MAXLST=0
MAXPARK=0
MAXPOP=5
MAXSQL=0
MAXSUB=0
MTIME=1271068514
OWNER=root
PLAN=default
STARTDATE=1228721668
USER=username
RS=x3
where, x3 is the theme. WHM only provides the option to change the cPanel theme for an account one at a time. In order to change the theme for all the accounts at once, execute the following script:
for i in `ls -la /var/cpanel/users/ | awk ‘{print $9}’ | sed ‘1,3 d’`
do
sed -i “/RS/d” $i;
echo “RS=x3″ >> $i;
done;
here, it will change the cPanel theme of all the accounts on the server to ‘x3’ theme. Since all the files are updated manually, you need to execute the following script to rebuild the cache
/scripts/updateuserdomains
Note: The single OR double quotes in the script may change to dot (.) on copy/pasting the command in the shell, so make sure you correct those before executing the command.