Oct
11
2011

Fix Timeout Issues in CURL, PHP, and Apache

Hitting strange errors when trying to execute long-running PHP processes, like large file reads, generating static HTML pages, file uploads, or CURL calls? It might not be just bugs in your code. Are you getting pages that seem to load, but then nothing shows up in the browser? When you go to a page, does your browser sometimes ask, “You have chosen to open something.php which is a : PHP file. What should Firefox do [...]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
Oct
5
2011

Installing Memcached for PHP on 8.04 and newer

Just as a note and to update everyone who still links to this article through Google. It is now much easier to install Memcached and getting it ready for action. It involves a few very simple steps. To install in terminal type: Code: sudo apt-get install memcached sudo apt-get install php5-memcache sudo /etc/init.d/apache2 restart Now memcached is installed, the next step is to run an instance of it and test it. Lets create an instance [...]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
Oct
1
2011

Quy tắc viết htaccess trong PHP

Hướng dẫn – .htaccess rewrite tips using RewriteRule and RewriteCond for .htaccess mod_rewrite Be aware that mod_rewrite (RewriteRule, RewriteBase, and RewriteCond) code is executed for each and every HTTP request that accesses a file in or below the directory where the code resides, so it’s always good to limit the code to certain circumstances if readily identifiable. For example, to limit the next 5 RewriteRules to only be applied to .html and .php files, you [...]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
Aug
29
2011

Using wp_pagenavi() with custom queries

The old way (which still works): query_posts( array( ‘tag’ => ‘foo’, ‘paged’ => get_query_var(‘paged’) ) );   while ( have_posts() ) : the_post(); the_title(); // more stuff here endwhile;   wp_pagenavi();   wp_reset_query(); // avoid errors further down the page The new way (better, because it has less side-effects): $my_query = new WP_Query( array( ‘tag’ => ‘foo’, ‘paged’ => get_query_var(‘paged’) ) );   while ( $my_query->have_posts() ) : $my_query->the_post(); the_title(); // more stuff here endwhile; [...]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
Aug
27
2011

Tìm hiểu về Comet

comet là một kỹ thuật để tạo hiệu ứng push dữ liệu từ server đến client browser (thay vì client browser request/poll server như chúng ta vẫn biết) redis là csdl, đặc điểm của nó là nằm trong RAM (và đồng bộ vào disk theo chu kỳ do mình thiết lập) nên tốc độ cực nhanh (như memcache bởi cũng h/đ trong RAM – thậm chí nhiều benchmark còn cho thấy nó nhanh hơn cả [...]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
Pages:«1234567...15»

Sponsors