Linux replace command all files with sed shell command

Scripts, SSH, www

Replace word in all files with sed via linux shell command

To replace string design/nashik to designing/india on the same file textNashik.html
Use the following linux command with the syntax.
sed -i s:design/nashik:designing/india:g textNashik.html

Another Example:
sed -i s:twitter.com/webservices:twitter.com/dnswspl:g home/*.html

Replacing phrase in all files including directories and subdirectories using sed and find

find . -type f -exec sed -i ‘s:ecommerce.html:ecommerce-shopping-cart.html:g’ *.html {} \;

NOTE: ‘:’ used as a substitue for ‘/’ as / is used in search and replace.

Related: Linux Command, Shell Command, Sed Command, Replace Text, Linux Replace

Execute PHP script from cron or command-line

cPanel, PHP, Scripts, SSH, Web-Hosting

Execute PHP script from cron or command-line

One of the method for running PHP scripts from a cron job is run the script using php from the crontab. You will need to call the php script from your crontab as given below.
To execute somescript.php every 1 hour you will need to edit and add below given line in your crontab file:
00 * * * * /usr/local/bin/php /home/someuser/somescript.php

If you are looking for command-line interpreter, then it can be done with the following command. It shows how to run a script using the PHP command-line interpreter:

/usr/local/bin/php -q /home/someuser/public_html/somescript.php
The -q option is for quiet mode, to prevent headers being displayed.

Make a note of code in your PHP script, it may only run correctly if called from a mentioned path. For example, if the script uses relative paths to include files, it will only run if it is called from the specified directory. The following command shows how to run a PHP script from a specific path:

cd /home/username/public_html/; /usr/local/bin/php -q script.php

Related: Dedicated Server, Virtual Server, Web Server Hosting

syslogd klogd warning in firewall

CSF, Dedicated Server, Firewall, Security, SSH, VPS Hosting, Web-Hosting

If you are getting this WARNING message, what you need to do?

Syslogd appears to be running, but not klogd which logs kernel firewall messages to syslog. You should ensure that klogd is running.

How do you enable klogd?

Fire a command:
#whereis klogd
Then simply run klogd with full path:
klogd

Related: Dedicated Servers, VPS Hosting

Find files greater than MB GB size in linux ssh

Dedicated Server, SSH, Virtual Private Server, Web-Hosting

Find files greater than MB GB size in linux ssh. ( Such a helpful ssh command to find big, larger or largest file on server)

The following ssh command will list all the files in the system greater than 200MB.
# find / -type f -size +200M

The following ssh command will list all the files greater than 2GB.
# find / -type f -size +2G

The following ssh command will list all the files greater than 10MB from home folder only.
# find /home -type f -size +10M

Related: Linux SSH, Virtual Server

HTML signature on Webmail Company Logo in Email

Email Hosting, Setup, Shared Hosting, WebMail, www

Creating HTML signature on Webmail, Squirrel, Roundcube Other Mail clients

You must be wondering how people add their company logo in the email signature! Just follow the steps given below and you will be able to add image in your email signature as well!
1. Log in to your webmail
2. Select Roundcube webmail application
3. Click on the Personal Settings on the Right Top Panel
4. Select on Identities Tab.
5. Double Click on the Display name.
6. Click on the HTML editor to enter your HTML signature
7. Click Save after you are done.
8. Go to Preference tab and check on the box for Compose HTML message.
9. Click Save and Done.

If you are not comfortable with the code then you might want to try the below given sample code and customize it as per your requirement:

Your name goes here
Your position goes here
Your Company Name
Your Tag Line
yourname@yourdomainname .com
Your phone number goes here

Your Company Name

You will want to change all the highlighted areas to the appropriate settings for your environment prior to placing in the signature area.

Note: If you are looking for the html signature in ‘SquirrelMail’ then you might get dissapointed as there is no html signature available in ‘Squirrel Webmail’. For html signature, you can start using ‘RoundCube’.

Remote server requires Network Level Authentication (NLA)

Dedicated Server, Security, Setup, VPS Hosting, Web-Hosting, Windows Hosting

How to enable RDP access on server requires Network Level Authentication (NLA)

With Remote Desktop (RDP) when connecting to a Windows Server (XP-SP3 or 2003/2008) with newer remote host, you might get an error saying that “The remote computer requires Network Level Authentication (NLA), which your local pc/laptop/desktop computer doesn’t support.”

To enable the RDP access on server requires Network Level Authentication (NLA) you need to follow below given steps [be careful with registry editor, it’s helpful to backup your registry first, you have been warned]:

  1. Install Service Pack 3 [if XP]
  2. Click Start->Run, type regedit and then press enter
  3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  4. Double click on “Security Packages”, to modify the values, leave all existing values, and just add “tspkg” at the end of the list, click OK to save your changes.
  5. Now, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders
  6. Double click on “SecurityProviders”, and in the dialog box, add “credssp.dll” at the end, be sure that if the list that is present currently is separated by commas, that you add a comma to the value immediately before the “credssp.dll”. Click OK to update.
  7. Close the registry editor and now restart your computer for changes to take the effect.
  8. Try to RDP to your remote server.

Still, finding it difficult, not to worry, get in touch with one of our technical help expert to assist you further.

Related: Windows Server, Remote Desktop, RDP, Server 2008, Windows XP SP3, Windows VPS

Domain Name – Important Factors about Domain

Domain Name, Web-Hosting, www

Important factors about domain name registration.

A factor by factor quality analysis of the domain name unichost.com, as an example, is given below. Useful for website appraisals, and buying and registering domain names.

1. Length

Unichost is a 8 character word. Shorter words make better domain names. At 8 characters unichost.com should make a good domain name.

2. Dictionary Words

Unichost per-se is not a dictionary word but it contains dictionary words. Domain names with dictionary words generally make better domain names than those without. Recommended tool for keyword analysis – www.deckey.com.

3. Top Level Domain

.com is always the best. Full score for TLD factor. People are more likely to type unichost.com than unichost.bz or unichost.me or unichost.info.

4. Distinctivity

Distinctivity is the most important factor of all. unichost.com has a high distinctivity factor. Users will be able to remember unichost.com without much effort. Good choice for a domain name.

Conclusion:

UnicHost.com scored better than 82.883% of 1984314 domain names in the Domometer database.

Related: Domain registration, Domain hosting, Website Name

Website Migration with no Downtime !

Setup, Transfer, Web-Hosting

Migrate website with 0 downtime !

Are you frustated with cheap, low performance with your current hosting provider? Not getting the after sales service? Then definitely this is the time to switch to UnicHost, premium hosting service provider.

UnicHost offers you easy migration at almost no downtime. Our hosting migration experts will take care of the total migration. Our technical experts will move your website files, databases, emails, domains from your old web-hosting account to your new web-hosting account at UnicHost! You need not to worry about the site migration as our 24/7 operating support team has dealt with several website migrations, whether it is a blog, a forum, with or without ssh access, server accounts from plesk to cpanel, from cpanel to plesk, or any other control panel,  everything has been successfully migrated to UnicHost servers, with almost no downtime.

What you would need to do to migrate the website? Just order your hosting package from UnicHost, activate your order and send a request to Technical Support department for the migration. Leave the rest to us, that’s it!! You will receive an update once everything is migrated successfully.

Related: Website Hosting, VPS Hosting, Dedicated Servers, Cpanel Hosting, Plesk Hosting

Website on plesk windows Server asking for Username and password

Dedicated Server, Virtual Private Server, VPS Hosting, Web-Hosting, Windows Hosting

Website on Plesk Windows Server/Plesk VPS asking for Username and password.

I have recently purchased a Windows VPS with Plesk control panel and have uploaded website files. While visiting my website it is asking for username and password authentication. Now, I haven’t set any authentication on server for any website, what shall I need do?

This is quite common with the sites hosted on windows server with plesk as a control panel. You are not allowed to acces the site whtout authentication – entering username and password. This is not a bug or issue but is related to password synchronization with IIS server. To resolve this, you will need to synchronize the password.

Below given are some simple steps that you will need to follow:

  1. RDP to your windows server as an administrator.
  2. Start>Run>cmd [this will take you to sytem command prompt]
  3. cd to plesk\admin\bin [shortcut is cd %plesk_bin%]
  4. Type websrvmng.exe –update-anon-password –domain-name=yourdomain.com

The above command will synchronize the password and you will require no more password authentication to view the content.

If this doesn’t work for you, then please open a support ticket and we’ll investigate further and fix the issue for you happily.

~Admin

Related: Windows VPS, Windows Server, Plesk VPS, Windows Dedicated

Captcha image is not working – Fatal error?

Dedicated Server, PHP, Scripts, Security, Virtual Private Server, Web-Hosting, www

Captcha image is not working – Fatal error?

You have the GD image library installed and otherwise working.
Still unable to get captcha with the captcha plugin.

You are not sure what’s the problem as it works on one of your other sites.  When you try to include the captcha on your website or contact form it generates an error message like…
Call to undefined function imagettftext() OR
Fatal error: Call to undefined function imagettftext() in /home/user/public_html/appfolder/plugins/captcha/captcha.php on line 99  OR
Fatal error: Call to undefined function imagefttext() in /home/user/public_html/lib/captcha/captcha.php on line 329 OR
‘–enable-gd-native-ttf’

Problem could be, because the standard PHP “imagefttext()” function does not work on your server.
It can caused by the fact that there is no –enable-gd-native-ttf key installed on your server as the Cart uses GD Library for displaying the verification image.

Please note that PHP must be configured with the following keys:
–with-gd –enable-gd-native-ttf  Contact your host to make the change!

Any idea why or how it can be fixed?

imagettftext() is part of the GD image functions library, which is not always part of PHP (the code CMS/Cart runs on).
You need to contact your host and ask them to install the PHP GD library. It’s really simple for them to do and is fairly common, so if they give you a hard time about it, I would seriously consider switching to better and friendly host – UnicHost :).

Related: Web Server, PHP Hosting, LAMP Server, cPanel Hosting

 
©2018, All Rights Reserved. Managed-Servers by UnicHost Web Solutions. Powered by UnicHost.
Log in