the reload() function takes an optional parameter that can be set to true to reload from the server rather than the cache. The parameter defaults to false, so by default the page reloads from the browser's cache.$('#something').click(function() {
location.reload();
});
Monday, April 15, 2013
Relaod/refresh page with Javascript Jquery
Saturday, April 6, 2013
Installing Ioncube
1. Download ioncube:
wget http://downloads.ioncube.com/loader_down...x86.tar.gz
2. Extract ioncube
tar zxvf ioncube_loaders_lin_x86.tar.gz
3.move file ioncube_loader_lin_5.3.so
mv ioncube/ioncube_loader_lin_5.3.so /usr/lib/php5/20090626/
4.create file called ioncube.ini (I use nano, you pick your editor)
nano /etc/php5/conf.d/ioncube.ini
5.copy and paste this line
zend_extension = /usr/lib/php5/20090626/ioncube_loader_lin_5.3.so
6. Restart Apache
/etc/init.d/apache2 restart
7. check if installed correctly
php –v
You should have working ioncube installation now. If not check what you missed.
Switching to worker mpm from prefork apache 2 on ubuntu
I'm on ubuntu and according to some tutorials, the following lines would do all the tricks:
Then you setup configuration inapt-get install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm php5-gd a2enmod actions fastcgi alias
/etc/apache2/conf.d/php5-fpm.conf:After all these, restart:<IfModule mod_fastcgi.c> AddHandler php5-fcgi .php Action php5-fcgi /php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization</IfModule>
service apache2 restart && service php5-fpm restart
Done!
PHP files downloading instead of executing
When you open your site php files are downloading instead of executing follow these simple steps and you will be good to go again.
first, install libapache2-mod-php5
sudo apt-get install libapache2-mod-php5
Then enable it
sudo a2enmod php5
Restart apache
sudo service apache2 restart
Clear your cache on your browser, and re-load the page.
Your php files should start executing again and you will see your site.
Thursday, February 21, 2013
Jquery date picker z-index issue
In your css use
'.ui-datepicker{ z-index: 9999 !important;}'
Here 9999 can be replaced to whatever layer value you want your datepicker available.
Neither any code is to be commented nor adding 'position:relative;' css on input elements. Because increasing the z-index of input elements will have effect on all input type buttons, which may not be needed for some cases.
Thursday, February 14, 2013
Install phpmyadmin
This is how we install phpmyadmin is LAMP stack
apt-get install phpmyadmin
nano /etc/apache2/apache2.conf
and add following code
Include /etc/phpmyadmin/apache.conf
then restart apache
service httpd restart
or
/etc/init.d/apache2 restart
access at
localhost/phpmyadmin
or
ip address/phpmyadmin
or
domainname/phpmyadmin
Wednesday, February 13, 2013
Common SSH commands
Here is a nice article on common SSH commands.
http://kb.mediatemple.net/questions/247/Common+SSH+Commands#gs
Tuesday, January 1, 2013
Breaking the shell
My biggest weakness has always been my inability to express myself. It happens often that I know much more than the people in front but I say nothing even if he is wrong. People think I know nothing and I think why to waste time arguing. But now I need to break this shell I have built around myself. I need to share more what I have learn.
Tuesday, October 9, 2012
Lets do this.. again!
I lost touch with my sites for some time as I moved to another city leaving Bhopal. I need to get things working again.
Bad thing that happened is that I failed to update my site at time in this period.
Good thing that happened is one of my site started getting three times traffic. I failed to figure out the reason but I guess its because of the latest Google algorithm update.