Install phantomjs in shared Host

23:46:00 Sarath S 7 Comments

     


In this post, we show you how to install phantomjs in shared hosting. Developers searching to install phantomjs in many shared hosting companies. Unfortunately, they don't support this type of installation on shared hosting plans. Read the post to install your phantomjs in your shared host.

       In this tutorial, I purchased a shared hosting plan. So we don't have the access to root. Before you read must have the knowledge in the FTP access to your site.

    Open your SSH client Putty. Then log in to your server using username and password. When the access is ready we have to change the directory without fear for access problem. 
cd ~
    Type in the terminal as for downloading the phantomjs.
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-i686.tar.bz2
We must have to extract the compressed file
tar xvf phantomjs-1.9.1-linux-i686.tar.bz2 
     Now we have the file in the directory with the name "phantomjs-1.9.1-linux-i686". Note this name. Login to your account and open your web root directory to call your phantomjs functions. Create a PHP file. Name the PHP file as you like. Here for example I called it as demp.php. And type following-  
<?php
exec ('/var/chroot/home/content/12/11235678/phantomjs-1.9.1-linux-i686/bin/phantomjs -v 2<&1', $o, $e);
print_r($o);
print_r($e);
?> 
    Now you will get the version of the phantomjs installed. You have the confusion about the path of phantomjs, you can get your directory of number(12/11235678) from your account's settings page. Or for getting path use "cd" and "dir" command for getting all file paths.

You Might Also Like

7 comments:

  1. Hi Sarath

    Just wanted to thank you very very much for this post. I was struggling to find a way to activate phantomJS in my server. You were the first good clear answer I could find.

    Cheers
    Marcelo Gil

    ReplyDelete
  2. GoDaddy Customer Care Number is one of the most searched for any helpline in India. Its provides you differnt languages customer care contact also.

    ReplyDelete
  3. This is the best post on phantomJS. It resolved all my worries in a very simplified manner. Thanks alot.

    ReplyDelete
  4. I Always prefer Godaddy Hosting and got many godaddy promotional code for Godaddy Domains and Hostings. you can also get godaddy coupon code from many websites. Godaddy domain coupon and Godaddy hosting coupons are available on many sites. I am using GoDaddy Wordpress Hosting Coupon each time when I required to buy Hosting.

    ReplyDelete
  5. your content is very inspiring and appriciating I really like it please visit my site for Satta King Result also check Satta king 24X7 and also check sattaking and for quick result check my site Satta matka and for super fast result check Satta king

    ReplyDelete