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

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

Why dont you provide unlimited bandwidth and unlimited web-space plans

Bandwidth, Web-Hosting

Do you provide an unlimited data transfer and unlimited web-space hosting package?

No, we do not provide unlimited hosting packages as there is no such ‘unlimited’ thing exists. In order to ensure high quality bandwidth and uptime to our respected customers we don’t allow anyone to be hosted on our web server to use unlimited bandwidth, data-transfer / throughput.

There are some hosting provider exists that offer free hosting or offer “unlimited bandwidth” and “unlimited web-space” plans. But after reading their acceptable use policies you will find that no site is allowed to use an “excessive” amount of resources. If you use too much resources, whether it is disk-space, bandwidth or CPU time, these “unlimited” hosts will ask you to upgrade or leave or will suspend your website.

We don’t give false promises.

How to point multiple domain names to my existing website?

Domain Name, Web-Hosting, www

Do you allow to point multiple domain names to my existing website?

Yes, this is also called as domain parking. We can point multiple domains for you to your existing website. For this you will need to submit your request through support help desk. These domains must point to your main website.

If you are looking to host another website under the same hosting package, please get in touch with our sales team. We do offer generous multiple domain hosting discounts to host multiple websites under single account. (Usually you won’t get this facility with other hosts.)

[Note: You will be sharing existing resources for all the websites you add under the existing hosting account. There won’t be a separate control panel for each website.]

What is the difference between www and public_html ?

Web-Hosting, www

Is there any technical difference between www and public_html?

Actually, there is no difference between www and public_html. Technically, the default directory created to upload your web files is public_html. To make it more user friendly and understandable – www, the symbolic link is created (it is like a desktop shortcut) that points to the same folder. Upload your website related content to one of these folders, it doesn’t matter at all.

How to calculate bandwidth requirement for website?

Bandwidth, Web-Hosting

How much bandwidth required for website?

You would be able to calculate bandwidth, also called as data transfer or network traffic, at your own with the given formula. Consider 1GB of bandwidth as 100,000 hits. One unique visit consumes around 100KB of bandwidth on an average. An average customer with a basic website uses around 2GB to 5GB of bandwidth per month.

Where do I view the bandwidth usage report?

Your bandwidth usage will be reset back to zero every month. You would be able to see the bandwidth usage for your site from control panel. It shows the current month’s bandwidth usage as well as your total bandwidth usage. This will include all HTTP (web) and POP (mail) bandwidth usage including FTP bandwidth usage.

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