Archive

Archive for the ‘Cpanel Server’ Category

phpMyAdmin Error – Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly

May 16th, 2010 No comments

Last night I had migrated one our client accounts from old cpanel server to new cpanel server , customers reported their phpMyAdmin install was showing the error message “Cannot start session without errors”  and they were unable to even get to the phpMyAdmin login page on the new server.

This post looks at what caused the issue and how to fix it.

Clearly there’s something wrong with the way phpmyadmin sessions are being used. Cpanel work with is own internal PHP and store the application session files in different folder for security reason.

On Cpanel server, every application as his own php configuration setting like phpmyadmin , php configuration file is /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini , roundcube (/usr/local/cpanel/3rdparty/etc/roundcube/php.ini)

PHPmyAdmin session files are store in /var/cpanel/userhomes/cpanelphpmyadmin/ folder.  The /var/cpanel/userhomes/cpanelphpmyadmin/ folder ownership should be cpanelphpmyadmin.cpanelphpmyadminn  /var/cpanel/userhomes/cpanelphpmyadmin/ in order to get phpmyadmin work perfect.

root@server [/var/cpanel/userhomes]# chown cpanelphpmyadmin.cpanelphpmyadmin cpanelphpmyadmin/ -R

If session folder owned by any other username rather than cpanelphpmyadmin then you will get “Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly” error.

root@server [/var/cpanel/userhomes]# ll
drwxr-xr-x  4 cpanel           cpanel            4096 Dec 11 23:04 cpanel/
drwx--x--x  4 cpanelhorde      cpanelhorde       4096 Sep 24  2009 cpanelhorde/
drwx--x--x  4 cpanelphpmyadmin cpanelphpmyadmin  4096 Sep 24  2009 cpanelphpmyadmin/
drwx--x--x  4 cpanelphppgadmin cpanelphppgadmin  4096 Sep 24  2009 cpanelphppgadmin/
drwx--x--x  4 cpanelroundcube  cpanelroundcube   4096 Sep 24  2009 cpanelroundcube/
root@server [/var/cpanel/userhomes]#

Regards

Alex P

How to fix HTTP Error on Wordpress 2.6 Flash Uploader

June 17th, 2009 6 comments

Whenever you are trying to upload an image using the flash uploader in Wordpress and received a “HTTP error”? and uploading images status stuck in crunching ……..

Here solutions::

The problem has something to do with mod_security, which is basically a web application firewall that protects your website from a range of attacks. So you shouldn’t turn off this module as it protects your site from such malicious attack , You can add a special rule in .htaccess file which can be found in the root folder of your Wordpress installation to get work the flash uploader.

Open the .htaccess file in your website document root and add the following lines:

  • For Apache 1.X

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

  • For Apache 2.X

    <IfModule mod_security2.c>
    <Files async-upload.php>
    SecRuleEngine Off
    SecAuditEngine Off
    </Files>
    </IfModule>

Then try to upload the images it should be work like charm D:

How to update/install latest RoundCube on cPanel

April 14th, 2009 4 comments

Update/install latest RoundCube on cPanel

First you will have to uninstall/remove exiting RoundCube files/folder/database on your server,

  • Uninstall/remove exiting RoundCube
cd /usr/local/cpanel/base
rm -rf roundcube*
mysql -e 'drop database roundcube';
/scripts/upcp

Now follow the following steps to  update/install latest roundcube  version ,we need to get Roundcube before we can use it. The easiest way to get it is to visit http://www.roundcube.net and click on “Downloads” or just go to http://roundcube.net/downloads. Wait for it to download and then unzip (using WinZip or ZipGenius or tar -xzf roundcubemail-0.1.tar.gz) in the current directory.

  • update/install latest roundcube
cd /usr/local/cpanel/base
wget -O roundcube.tar.gz http://nchc.dl.sourceforge.net/sourceforge/
roundcubemail/roundcubemail-0.2.1.tar.gz
rm -rf roundcube.tar.gz
mv -f roundcubemail-0.2.1/ roundcube
cd roundcube
chmod -R 777 temp
chmod -R 777 logs
  • Database Configuration

Create the database, database user and install the intial sql file. The following commands will do this for you.

mysql -e "CREATE DATABASE roundcube;"
mysql -e "GRANT ALL PRIVILEGES ON roundcube.* TO roundcube@localhost IDENTIFIED BY
'DATABASEPASSWORD';"
mysql -e "FLUSH PRIVILEGES;"
mysql -e "use roundcube; source SQL/mysql.initial.sql;"

You will have to replace the roundcube password with ‘DATABASEPASSWORD’ field.

  • Configuring RoundCube
cd config
mv db.inc.php.dist db.inc.php
mv main.inc.php.dist main.inc.php

then open database configruation file  db.inc.php in your favroite editor like vi or pico or nano
vi db.inc.php
Find following line

$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';

Replace it with

$rcmail_config['db_dsnw'] = 'mysql://roundcube:DATABASEPASSWORD@localhost/roundcube';

Now Open main.inc.php

vi main.inc.php

Find

$rcmail_config['default_host'] = '';

Replace with

$rcmail_config['default_host'] = 'localhost';

Last steps , restart the mysql, cpanel services on your server. That’s it ,Have fun with your new Roundcube installation!!

Regards

AlexP