A great linux stuff website

Error: “Domain mydomain.com has outgoing email disabled” in webmail

Under cpanel server sometimes we getting such error like below.

Domain mydomain.com has outgoing email disabled.

This issue happen because the outgoing_email for all users has been suspended and those user added under below file
/etc/outgoing_mail_suspended_users

I have rename the same file to another name and restarted cpanel service which has fixed the issue.
You can try it.. Good Luck..!!

Protect Your changes in apache configuration in cpanel server.

Most of the Time what happen we made some manual changes in Apache configuration under cPanel server, after rebuild Apache conf or restarted Apache service then changes got reverted.

To update such changes and not to overwrite again in cpanel use below commands.

/usr/local/cpanel/bin/apache_conf_distiller –update

/usr/local/cpanel/bin/build_apache_conf

Above commands help to protect Apache configuration

How to Disable unnecessary modules in Apache

Its good habit to disable unwanted modules using Apache, below are the steps which we can used

Step-1: check the httpd -m first and check the module list

Step-2: Open Apache Configuration file
vi /etc/httpd/conf/httpd.conf

Under LoadModule section add the module names
For Example:
libxml posix wddx session etc can be add in same configuration file and comment it.

# LoadModule libxml posix wddx session

Step: 3 Save and restart Apache services That’s all

-: php: command not found + plesk server

Sometimes cron script properly configured and crontab added as well but in plesk control panel it shows the error which his.
“php: command not found

In order to resolve the issue the cron execute permission need to be correct, by using below command from ssh

/usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell “/bin/sh”

O/P SUCCESS: Server preferences are successfully updated.

php.ini not updating because of cagefs in cpanel server

Sometimes you wish to make the in global PHP.ini file under cpanel server and those changes not reflecting for domain name.
For example if you wish to enable some PHP function for server side all domains then those function not working for your domain or not showing in domain phpinfo file.

It is require to add customize php.ini file for each domain under respective document root path /home/user/public_html/php.ini

” This issue occur because if cagefs enabled for all domains, what is recommendation to update cagefs on server.”

# cagefsctl –update

This will allow to enable php function for globally which will be showing for each domain phpinfo page.

How to take all mysql database backup at once in cpanel server

Step1: create a file /home/test.txt and add all databases names there.

Step2: Apply below command which will dump all databases in /home directory.

# for i in `cat test.txt` ; do mysqldump $i > $i.sql ; done”

Inode process find and break down

# for i in `ls -1A | grep -v “\.\./” | grep -v “\./”`; do echo “`find $i | sort -u | wc -l` $i”; done | sort -rn | head -10

# echo “Inode Usage BreakDown: $(pwd)” ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv .|sort`; do c=$(find $d |wc -l) ; printf “$c\t\t- $d\n” ; done ; printf “Total: \t\t$(find $(pwd) | wc -l)\n”