1 / 26

Hosting Packages, FTP, and other Hacks

Hosting Packages, FTP, and other Hacks. 14 February 2012. Connection Strings. Be wary of differences between dev and live environment Code syntax may vary. Look at the version of code you are running in development! Is it the same as the hosting plan or server you plan to use. .

fancy
Download Presentation

Hosting Packages, FTP, and other Hacks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hosting Packages, FTP, and other Hacks 14 February 2012

  2. Connection Strings • Be wary of differences between dev and live environment • Code syntax may vary. • Look at the version of code you are running in development! Is it the same as the hosting plan or server you plan to use.

  3. Did not work in Register365 $mysqli = new mysqli("sql6.hosting365.ie ", " Ballins_aonghus ", “password", “Ballins_gps "); if (mysqli_connect_errno()) { printf("Connect failed"); exit(); } else { $sql = “Select * From Users"; }

  4. This did work in Register365 $mysql= mysql_connect("sql6.hosting365.ie", "Ballins_aonghus", “password", "Ballins_gps") or die("Could not connect: " .mysql_error());

  5. Hostname - localhost • Development environments set up on your local machine can often use localhost • A hosting package will commonly provide you with a hostname. • E.g. sql6.hosting365.ie

  6. Client Requirements • If client has its own server or has an existing hosting plan with a provider, they may require your system to be built in compatible versions of code. • E.g. UCC does not support php > version 4 • New functionality included in php 5 will not run on their server and will break your site! • Be careful to plan for this

  7. Hosting and Domains • You will need a hosting package or server space on existing web server (e.g. ucc.ie) • You will need to register a domain name separately (e.g. .com; .ie; .eu; etc) • Typical vendors will provide both services

  8. Hosting and Domains • Local business providing hosting and domain registration: CCS Host in Carrigaline • http://www.ccshost.ie/dedicated-hosting.php • Others include register365.ie; blacknight.ie; lethost.com

  9. Hosting Package • Gives you server space • Essentially you will be provided with a “file-manager” type of set up • Here you will be able to store your website files for each domain sitting on your hosting package • Typical admin section allowing you to manage databases (if included in your hosting package)

  10. Domains • You can register domain name without having a hosting package • .com is cheaper and involves less admin to obtain than .ie domains • With .com you choose an available domain name, pay the fee and its registered a couple days later • With .ie you choose domain name, pay about 2/3 more, and you must provide license, id, and business number etc

  11. Hosting and Domains • Once you have obtained a hosting package and a domain name(s) • Add the domain to your hosting package. This will create a subfolder on your hosting package server space • wwwroot is typically what you will see in your server folder for each added domain. Within this is where you place your web files

  12. Hosting and Domains • Having added your domain(s) to the hosting package you will be able to access a range of admin settings: • Creating FTP accounts • Creating email accounts • Managing dBs • Etc etc

  13. File Transfer Protocol (FTP) • Allows you to transfer files to and from an external server • Very useful if you need to upload many files (e.g. Wordpress, Joomla, Drupal) • FileZilla is a freely downloadable FTP client

  14. FTP • Can set up FTP user account access from your hosting admin section. • Username • Password • Hostname (not localhost) • Port (sometimes specify – leave blank otherwise)

  15. Secure Shell SSH • Depending on your client you may not have access to a nice GUI interface to work with databases. • Sometimes you may have to access database directly. • SSH is a way of doing this. Freely downloadable SSH client is Putty. • Contact me if you need more info/help on this!

  16. SSH via Putty

  17. Any other Issues • SMS – Clickatell ?? • PayPal integration • OpenCart • Wordpress, Joomla, Drupal

  18. RESTful Web Services • Anyone developing using web services?? • Really hot area – Simon Woodworth is the authority you’ll want to talk to • Doodle API – Can access this using a range of different languages

  19. Clickatell– SMS Sample Code • Clickatell will provide you with a file which will contain class and methods allowing you to access their SMSApi • Create an account with clickatell online and purchase credits. You may be able to get sample credits for testing environment before you go and buy real credits

  20. Clickatell– SMS Sample Code • Within the class provided by Clickatell, change lines of code to reflect your clickatell id, username, and password. Example below in php (generally the same process in other languages) • Within the class sms change the following variables var$api_id = "33453476"; [Whatever api_id you are given when creating clickatell account online] var$user = "aonghus"; var$password = “kerryforsam2012";

  21. Clickatell - SMS Sample Code • In whatever code file you wish to access the sms functionality you will need to create a new instance of the sms_api object. • The following php code references the sms_api.php file (if using java you may use something like import … and so on). Then create new instance of sms object require_once ("sms_api.php"); // Load sms-api class $mysms = new sms(); // Initialize object. Take note of the name you choose here ($mysms) for later

  22. Clickatell - SMS Sample Code • In order to send a SMS, you can call the send method which resides in the sms_api.php. Note this requires 3 values to be passed to it. $fornum = “353860000001”; // variable holding phone number $mname = “RandomCo”; // variable to hold name of sender that you want to present on the receivers screen $body = “Hi, special offer all this week at RandomCo”; // variable to hold message $results = $mysms->send($fornum,$mname,$body); //$mysms is name of instance of api object chosen in the last slide. ->send($fornum,$mname,$body) calls the send method within that api and given that you provide it appropriate values and you have enough SMS credit, it will send message.

  23. Any Questions • You’ll find online contact form and details at http://aonghussugrue.wordpress.com/about/

More Related