How to work around “is not an EA4 SCL PHP” error

“ea-php72” is not an EA4 SCL PHP

Update both .bash_profile and .bashrc files under your home/ directory as following:

export PATH=/opt/alt/php72/usr/bin:$PATH
alias ea-php72="/usr/local/bin/lsphp"

Use a real path to your PHP binary file if its not yours /usr/local/bin/lsphp

Run to apply updates:

source .bashrc
Read the rest

SMTP Error: Message size exceeds server limit

You seems got this error at Roundcube or Horde.

Here is explanation how it works:

Supposedly you’re trying to send message with an attachment file 44M

And you have the message_size_limit set in 50M as explained here

And you will not be able to send such message because attachments in a message are encoded by base64

It means your message will be by 30% bigger than expected, please see below calculation

44*0.30=57

You cannot send such message due to the limit in 50M, so you need either rise message_size_limit or upload and share your attachment to services like Gdrive/Dropbox/etc… Read the rest

How to remove mailman archives on cPanel server

Find your mbox files

ls -la /usr/local/cpanel/3rdparty/mailman/archives/private/my1_lists.domain.com.mbox/my1_lists.domain.com.mbox
ls -la /usr/local/cpanel/3rdparty/mailman/archives/private/my2_lists.domain.com.mbox/my2_lists.domain.com.mbox

Backup *.mbox files if needed and empty them:

truncate -s 0 /usr/local/cpanel/3rdparty/mailman/archives/private/my1_lists.domain.com.mbox/my1_lists.domain.com.mbox
truncate -s 0 /usr/local/cpanel/3rdparty/mailman/archives/private/my2_lists.domain.com.mbox/my2_lists.domain.com.mbox

Go to bin/ folder and wipe as following:

cd /usr/local/cpanel/3rdparty/mailman/bin

./arch --wipe my1_lists.domain.com
./arch --wipe my2_lists.domain.com
Read the rest

How to create a file of specific size using Linux command line

Reduce size using truncate command

Run for a second:

yes "some text" > testfile.txt

Reduce size using truncate:

truncate -s 50M testfile.txt

Create 50M file using fallocate command

fallocate -l 52428800 testfile.txt

To be more exact using inline arithmetic:

fallocate -l $((50*1024*1024)) testfile.txt
Read the rest

How to reinstall Softaculous on cPanel server

Backup settings files/folders:

rm -rf /usr/local/src/softaculous_settings_bk
mkdir -p /usr/local/src/softaculous_settings_bk
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/universal.php /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/iscripts.php /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/categories.ser /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/conf /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/hooks /usr/local/src/softaculous_settings_bk/

Do the re-installation:

wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
./install.sh --force-download

Restore your settings:

cat /usr/local/src/softaculous_settings_bk/universal.php
Read the rest

How to get list of users using Drush cli

Please try to use one of the following

drush users:list
drush user-list
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(name) FROM users_field_data")
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(uid) FROM users")
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(name) FROM users")

Don’t forget about mysql prefix if any

cat sites/default/settings.php
Read the rest

How to edit exim.conf file on cPanel server and prevent it from overwriting

Here is how it works in other words plus example:

/etc/exim.conf – you can edit this file to keep some changes temporary, then restart exim to get them working. After /scripts/buildeximconf you changes will be reset.

/etc/exim.conf.localopts – its the same as WHM –> Exim Configuration Manager –> Standard options (Basic editor).… Read the rest

How to change WordPress main URL to new one

Using WP-CLI (preferred):

Enter folder where your WordPress is installed:

username@server1 [~]# cd ~/public_html

Create backup of your database:

username@server1 [~/public_html]# wp db export

The following command won’t do any change because of –dry-run key specified but show you tables and amount of replacement

username@server1 [~/public_html]# wp search-replace 'OLDdomain.com'
Read the rest

SitePad publishing issue after migration. Wrong FTP details error

To get it fixed your need to force SitePad re-create FTP credentials firstly

root@server1 [/home/someuser/.sitepad]# cat user.php
a:7:{s:25:"disable_all_notify_update";i:0;s:8:"timezone";i:0;s:6:"apikey";s:32:"zd1k52apam18404pdjg47uo2e8fiug1tzovjr8j";s:7:"apipass";s:32:"4xafz21nlx2nryars3cb7xgjr5x0sx1";s:8:"ftp_user";s:26:"[email protected]";s:8:"ftp_pass";s:12:"zReGgnq)W1n]-3-1";s:8:"ftp_port";i:21;}
root@server1 [/home/someuser/.sitepad]# mv user.php user.php_old

Now login customer’s cPanel –> SitePad.
You will see brand new interface seems as you never had SitePad’s website.… Read the rest