September 3rd, 2010
admin
On accessing Drupal site I use to get following error:
Parse error: syntax error, unexpected ‘(‘, expecting ‘)’
Above error is mainly because of Drupal modules compatibility issue with php4.
In this case if you are on php4 server then you will need to run your application on php5 server.
If you are on php5 server and still you get the Parse error then in this case the fixed that worked for me was adding Handler to to the installation directory of Drupal.
To add handler create .htaccess file under installation directory and add following.
AddHandler application/x-httpd-php5 .php
--------------------------------
webhostings@rocketmail.com
September 3rd, 2010
admin
Error after logging to cPanel:
can’t create /home/username/.cpanel/datastore/all_iplist.db: No such file or directory at /usr/local/cpanel/Cpanel/DIp/MainIP.pm line 198
Carp::croak(‘can\’t create /home/username/.cpanel/datastore/all_iplist.db: No …’) called at /usr/lib/perl5/site_perl/5.6.2/i686-linux/Storable.pm line 76
Storable::logcroak(‘can\’t create /home/username/.cpanel/datastore/all_iplist.db: No …’) called at /usr/lib/perl5/site_perl/5.6.2/i686-linux/Storable.pm line 258
Storable::_store(‘CODE(0xa7ad524)’, ‘ARRAY(0xb7a2188)’, ‘/home/username/.cpanel/datastore/all_iplist.db’, 0) called at /usr/lib/perl5/site_perl/5.6.2/i686-linux/Storable.pm line 218
Storable::nstore(‘ARRAY(0xb7a2188)’, ‘/home/username/.cpanel/datastore/all_iplist.db’) called at /usr/local/cpanel/Cpanel/DIp/MainIP.pm line 198
Cpanel:Ip::MainIP::getconfiguredips() called at /usr/local/cpanel/Cpanel/DIp/MainIP.pm line 39
Cpanel:Ip::MainIP::getmainip() called at /usr/local/cpanel/Cpanel/DIp.pm line 38
Cpanel:Ip::isdedicatedip(serverip) called at /usr/local/cpanel/Cpanel/ExpVar.pm line 398
Cpanel::ExpVar::hasdedicatedip() called at /usr/local/cpanel/Cpanel/ExpVar.pm line 277
Cpanel::ExpVar::expvar(‘$hasdedicatedip’) called at cpanel line 1443
main::execiftag(”) called at cpanel line 4043
main::dotag_finished_headers(”, 0) called at cpanel line 3898
main::cpanel_parseblock(‘^J…’) called at cpanel line 3842
main::cpanel_parse(‘GLOB(0xa7d9698)’) called at cpanel line 5331
main::run_standard_mode() called at cpanel line 387
If you get above error after logged into cPanel, then do not panic there is a simple fix for this error.
If you have root access to server then check cPanel logs at
tail -f /usr/local/cpanel/logs/error_log | grep cPanel-username
Note: Replace your actual cpanel user name with cPanel-username and try accessing cPanel which will generate error logs for cPanel.
Logs will show you that you have exceeded your allowed disk quota for domain.
Now you will need to delete unwanted file from your account or increase disk quota for domain which will fix the issue.
--------------------------------
webhostings@rocketmail.com
There are differnt steps to install PostgreSQL as per the control pnalel installed on your server.
Say if you have cPanel/WHM installed on yuor server, then you can install it by going th following steps.
1) ssh to server and execute command
/scripts/installpostgres
Above command will take few sec/minutes to complte the installation.
2) Once this is done you can access WHM as root and go to SQL Services >> Postgres Config >> click the Install Config button.
NOTE: If you have any existing PostgreSQL configuration, this will overwrite your configuration authentication file ( pg_hba.conf).
3) Settings pgsql admin password.
WHM >> SQL Services >> Postgres Config >> enter password in the text box and >> Change Password
NOTE: Do not use non-alpha numeric characters, as these cause problems.
--------------------------------
webhostings@rocketmail.com
pg_dump is an effective tool for PostgreSQL through which we can backup postgres database and to restore PostgreSQL database, command psql is enough.
1) backup postgres database
Ssh to server and execute following command to take backup of database.
#pg_dump -U Db_User Db_name -f database_name.sql
Executing above command will prompt you for database password, once password is authenticated database will be backup into file database_name.sqlNote: replace Db_User and Db_name with your actual database user and database name respectively.
2) Restore postgres database
#psql -U Db_user -d Db_name -f mydb.sql
--------------------------------
webhostings@rocketmail.com