Wednesday, August 24, 2016

Line up text under Font Awesome icon

I am trying to display font awesome icon in a box like a button. I've been able to do that. So far so good...It'll look like this. without hover and with hover
HTML

 <div class="fa-hover">  
 <a href="www.awtsoft.com"><i class="fa fa-pencil-square-o fa-3x" aria-hidden="true"></i>New Post</a>   
 </div>  

CSS
 .fa-hover a {  
   overflow: hidden;  
   white-space: nowrap;  
   display: block;  
   color: #222;  
   line-height: 20px;  
   height: 80px;  
   padding: 10px;  
   border-radius: 4px;  
   border: 2px dotted greenyellow;  
 }  
 .fa-hover a:hover {  
   background-color: #1d9d74;  
   color: #fff;  
   text-decoration: none;  
 }  
 a i.fa {  
  display: block;  
  text-align: center;  
 }  

Thursday, August 18, 2016

Disk Quota in WHM/cpanel is not working properly

In my VPS server Disk Quota in WHM/cpanel is not working properly. Every account's disk quota is showing unlimited. There is a easily solution if you have SSH access

You can fix this issue by yourself.
You need to login SSH and just copy and past this command and press enter
"/scripts/fixquotas"

Then you'll get this following notice
" The '/'' partition uses the XFS® filesystem. You must reboot the server to enable quotas."

Then reboot the server to active this feature.

Saturday, August 6, 2016

Why API/ file(url) request is not working/sending in cpanel / php

One of my web apps using API for SMS. I was using to send request as URL using file() function. Everything was working till i transfered my apps to another server. In new server it was not working even it was not sending the request.

I found from phpinfo() that allow_url_fopen was disable. To use file related php build-in function
like  fopen()copy()file_exists() , readfile()file() , file_get_contents() ,filesize() We need to make sure that  allow_url_fopen  is enabled.

If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.

allow_url_fopen, how to enable

This can be done via your php.ini file by adding the following line:
allow_url_fopen = On
The php.ini file is where you declare changes to your PHP settings. You can edit the existing php.ini, or create a new text file in any subdirectory and name it php.ini.

Total Pageviews