How to Run PHP in JSP/JAVA

quercusphpWith Apache Tomcat developers can enable PHP only in one web application and run it globally for all applications under tomcat. Generally, PHP is said to have several orders of magnitude more open source code and projects. Those developers favoring the Resin application server have the ubiquitous of PHP. Implementing PHP in Java would benefit both the PHP users and pure Java users. The developers can use the Java EE 5 platform-compliant Web container in Web Server to build reliable and scalable Web applications that are highly demanded.  Here's a comprehensive article that shows you how to run PHP in Java as well as JSP/Servlet-PHP integration options.

Full article (933 words) »

How to Stop Crashing / Hanging of php-cgi / spawn-fcgi with nginx / lighttpd

One of the frequently complained problems while using nginx or lighttpd, two popular and rapidly growing web servers which are faster and lighter alternatives to big daddy Apache web server, with php (through fastcgi interface) is that the pool of php-cgi which ultimately serves the php pages seems to hang frequently and without any apparent reasons. This is also the reason you will see the most common error on nginx website is the dreaded 503 - Gateway Time out. These errors seems to happen without much pattern and it took us some time to find the cause and fix it. In this article we will not only show you how to get rid of this error but also to enable pre-defined QoS with different PHP based services so that even if one pool of fast-cgi servers go down, the others continue to operate unaffected. In short if you have a popular website or blog running on nginx or lighttpd, then you should read it. Please mention it in your favorite social bookmarking service and digg it so others can see it too.

Full article (887 words) »

Review: Doox CMS, an Open Source Content Management System

DooxCMS 3.0 is a flexible Web 2.0 Content Management System which was built with PHP Script and Ajax framework.  It can be used to create from simple website  to large corporate website. Installation was simple. The software has built-in SEO optimization to help your website rank better. Read the full review in Enterprise Blog.

FirePHP- Firebug Extension for AJAX Development through PHP Method Call

Firebug has been an incredibly useful firefox add- ons for developers. Now, there is more to it, Firephp. FirePHP enables you to log to your Firebug Console using a simple PHP method call. FirePHP is ideally suited for AJAX development where clean JSON or XML responses are required. All data is sent via a set of X-FirePHP-Data response headers. This means that the debugging data will not interfere with the content on your page. You must have Firebug installed and the Net panel enabled to use this extension.

Full article (230 words) »

Notes on a highly scalable WordPress Delivery Platform - Over 10K live requests / second, 20K concurrent connections

As you may be aware, if you are following my tweets, that we are testing a highly scalable WordPress delivery platform, which can serve over 10000 requests per second from a single server and handle over 20000 concurrent requests without failure. Sounds amazing? then read on…

Full article (1258 words) »

How to Tweet Using PHP without any Twitter App!

Do you want to upgrade your site with twitter so that you can upgrade your messages each time through the site only? What big deal about that- You may ask. Well how about doing it without doing it without downloading any application! How about writing a php code which will help you to upgrade your tweets simply? Here is how.

Full article (200 words) »

Ginger - Fully XML Video Player that Lets You Develop on Your Own

Are you looking for a media player which has no boundaries? A media player that will let you customize, add and remove features inside it and many more things as if You are the developer? Well, here is Ginger, a full XML media player that allows for the most flexibility. Built on the extensive Bridge Framework, you have easy and quick access to features you wish you had in other media players. Whether you know actionscript or not, the media player allows you to customize its functionality to do whatever you want.

Full article (110 words) »

How to Compress CSS Files Using PHP without Renaming

IF you are using a stylish and feature rich environment for your website, then your CSS files must have reached its limit of annoyance for you. So how can you compress CSS files using PHP? You can. Here is a simple trick to do that. On top of it all when you do it for an existing process, all the older files have to be renamed (CSS files to .php) and thus taking another handful of time and space increasing both the complexities. Keeping that in mind this code won't ask you to rename the files even. Don't you wanna know?

Full article (192 words) »

Developer Tips: How To Show Line Number in vi / vim & nano

vi / vim as well as nano are the most popular editors on Unix / Linux / Solaris and for hardcode Mac OSX users too. For developing / debugging we need line numbers. A way to get them to display line numbers doesn't jump out easily from their big documentation, so here are my simple tips on how you can display line numbers in vi / vim and nano editors. Full article (148 words) »

(WordPress) Translator Plugin Gold Version 1.2 Released

WordPress Translator Plugin GoldTranslator Plugin Gold (for WordPress blogs) provides automatic machine translation of blogs in 32 languages (more will be added soon) - German, Spanish, French, Italian, Portuguese, Japanese, Korean, Chinese Simplified, Chinese Traditional, Arabic, Dutch, Greek, Russian, Norwegian, Brazilian Portuguese, Bulgarian, Croatian, Czech, Danish, Finnish, Hungarian, Icelandic, Latin American Spanish, Filipino, Polish, Romanian, Serbian, Slovenian, Swedish, Welsh, Turkish and Latin. We provide unlimited free updates and upgrades and 6 months of free support.
Translator Plugin Gold has a lucrative affiliate program too. You can make a cool 30% from each sale!

The new features and fixes in version 1.2 (free upgrade for existing customers) are:

New Features

  1. Directory browsing of translator plugin directory has been disabled for better security.
  2. The ability to switch off translation statistics (from translator option page under Basic->Statistics->Disable Statistics section). You may gain some performance by switching off the statistics simply because it uses a database query to store the data. You can still use the Statistics widget to display your existing statistics. However it will not be updated if you decide to switch off stats. You can again switch it on any time.
  3. In Translator Plugin Gold 1.2 we added a new hook / callback facility to enable you to view and process the translated page before it is served to the end user. Please refer to developer guide to know how to use it. The importance of this hook cannot be understated.
    You can use the tgTranslatorPostFilterHook to edit / modify the content of the translated pages before it is served to the user. You can also take action based on the content or engine used to translate the page.
    This hook can be used to handle errors in translation or even catch and process new types of errors. The actions include 1. ability to send custom error pages, 2. re-direct to original pages (for example in case of error), 3. displaying custom error messages and more. Few use cases for this hook are:

    • Provide customized title, meta tags & descriptions for translated pages to eliminate concerns about duplicate content. Check out the translated pages in simple thoughts for some usage examples (hint: look at the meta tags and title).
    • Provide custom error pages or re-direct to original page when translator is unable to translate a page (due to overload or temporary unavailability of engines).
    • Filter translated pages
    • Add your own content to translated pages like advertisements etc. You can also do it using existing translator API. However this provides full control over processing translated pages before it is served to the end-user.

Full article (705 words) »

Protected by Comment Guard Pro