January 8, 2010 | Posted by
admin | Category: cPanel Management
Error:
Cannot start session without errors, please check for errors in your PHP and/or webserver log file, and configure your PHP installation correct.
You receive the error message “Cannot start session without errors” while accessing phpMyAdmin in cPanel. phpMyAdmin will not work if any of the following settings are incorrect on a cPanel server.
1. The owner and group of /var/cpanel/userhomes/cpanelphpmyadmin directory should be cpanelphpmyadmin recursively as by default phpMyAdmin sessions are written under /var/cpanel/userhomes/cpanelphpmyadmin/sessions/ directory.
chown cpanelphpmyadmin /var/cpanel/userhomes/cpanelphpmyadmin -R
chgrp cpanelphpmyadmin /var/cpanel/userhomes/cpanelphpmyadmin -R
The 1st step should fix the issue but if it doesn’t follow the next 2 steps:
2. Change the session.save_path parameter to /tmp in the file /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini i.e. edit the file
pico /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini
change session.save_path as below
session.save_path = /tmp
3. The /tmp directory permissions should be 1777, not 755.
chmod 1777 /tmp
Comments Off on phpMyAdmin: Cannot start session without errors
December 30, 2009 | Posted by
admin | Category: VPS Management
You may receive the error message while starting a VPS on OpenVZ server.
vzquota : (error) Quota getstat syscall for id 101: Inappropriate ioctl for device
vzquota init failed [3]
This is a typical Quota error message on OpenVZ servers while starting a VPS. The message indicates that you need to initialize quota on the VPS. You can follow the below steps to correct the issue
rm -f /var/vzquota/quota.101
vzquota drop 101
vzctl start 101
where, 101 is the VPS ID.
If you continue to receive the same error message while starting the VPS,
1. Make sure the server is booted with the OpenVZ kernel, you can check that out using
uname -a
2. The vz service is online.
service vz status
if not, restart the vz service
service vz start
Once you confirm the above two things, start the vps again with the vzctl command.
December 27, 2009 | Posted by
admin | Category: Linux Administration
How to redirect a website using .htaccess?
Redirect website http://mydomain.com to http://www.mynewdomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain\.com$
RewriteRule ^(.*)$ http://www.mynewdomain.com [R=301,L]
Redirect website mydomain.com with and without www requests to http://www.mynewdomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^mydomain\.com$
RewriteRule ^(.*)$ http://www.mynewdomain.com [R=301,L]
Redirect requests from http://mydomain.com to http://mydomain.com/subdirectory i.e. redirecting requests from main domain to a sub-directory.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^mydomain\.com$
RewriteRule ^(.*)$ http://www.mydomain.com/subdirectory/ [R=301,L]
Redirect all http (80) requests of a domain to https (443) i.e. redirecting requests from non-secure port to a secure port.
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://mydomain.com/$1 [R,L]
Comments Off on How to redirect a website using .htaccess?
December 27, 2009 | Posted by
admin | Category: cPanel Management
The e-mail address postmaster@mydomain.com deleted successfully.
Sorry, you do not have access to the domain mydomain.com
The error message is displayed when you delete an email account of a domain from cPanel >> ‘Email Accounts’ that is either shifted under another users account OR usually happens when a domain is swapped from add-on domain to main domain OR vice-versa. You cannot delete an email account from cPanel, and in this case, you have to manually remove the email account entries for domain from the existing account.
The files you need to remove the entries from are
/home/user/etc/domainname.tld/passwd
/home/user/etc/domainname.tld/shadow
/home/user/.cpanel/email_accounts.yaml
The directory that need to be removed is
/home/user/mail/mydomain.com
where, ‘user’ is the one under who’s account the email address of ‘mydomain.com’ exist.
Comments Off on Unable to delete an email account from cPanel
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?