phpFreeChat is a free, simple to install, fast, customizable and multi languages chat that uses a simple filesystem for message and nickname storage. It uses AJAX to smoothly refresh (no flicker) and display the chat zone and the nickname zone. It supports multi-rooms (/join), private messages, moderation (/kick, /ban), customized themes based on CSS and plugins systems that allows you to write your own storage routines (ex: Mysql, IRC backends …), and your own chat commands !
Why echo is slow in PHP and how to make it really fast
April 17th, 2010 by admin No comments »You may have noticed that PHP scripts that echo a lot of content appear to be running with poor performance…
Well, the operative word here is “appear”. It is a common misconception that “echo is the slowest PHP command”! :p
The problem is actually just a bandwidth issue! When you try to pump a lot of content though the Internet, at some point you experience “load time”… and at some point PHP actually experiences “send time”!
You may measure the execution time between the begining and the end of your script, and, on a slow connection, it may show you that it took 500 ms to execute. You may even narrow it down to a single echo statement that takes 480 ms to execute. But that time actually includes wait time where PHP cannot send any more data back to apache!
PHP:
ob_start();
echo $a_lot_of_content;
This will allow PHP to move on and appear to terminate fast. But the truth is, all the content is now in PHP’s output buffer, and although your script is done, PHP is still working in the background to send all that data to your web server (apache for instance).
Follow up:
To verify that the processing time doesn’t vary by employing this trick, you can log actual request processing times in apache.
Now, if you want PHP to really terminate, you need to give Apache a larger buffer in order to absorb the content from PHP. I believe the default Apache buffer is 4096 or 8192 bytes (anyone know how to verify this?).
If your PHP script tries to output 24 KB of data but apache can only buffer 8 KB, then yes PHP will be waiting. However, if you make the Apache cahce, say 32 KB, then PHP will send all its data to Apache and exit in a breeze!
Here is how you can change Apache’s buffer size in apache2.conf :
Code:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 15
MaxClients 40
MaxRequestsPerChild 20
SendBufferSize 32768
</IfModule>
The only important line in the SendBufferSize line. The other lines are provided for context so you can find the right place in apache2.conf to add the SendBufferSize line (in case it doesn’t exist already). I don’t have particular recommendations on the other lines at this point.
After restarting apache, look at your logs and execution times again. You will see them drop from 500 ms to 30 ms in the example above. That is, of course, as long as you don’t send more data in PHP than the Apache buffer can absorb.
Now, of course, this will *not* increase the end-to-end transfer time of the page from PHP to browser. However, it will allow PHP to exit faster, which may or may not free up resources on the server… probably depending on the configuration.
I am pretty sure it does free up resources if you use CGI. But if you use mod_php, I don’t know… Anyone?
Then, I guess, the next step would be to push the data out of Apache faster… but I’m not sure there is another buffer that could be augmented in between Apache and the actual Nagle Algorithm that manages the transfer speed.
TYPO3
April 16th, 2010 by admin No comments »TYPO3 is a free Open Source content management system for enterprise purposes on the web and in intranets. It offers full flexibility and extendability while featuring an accomplished set of ready-made interfaces, functions and modules.
TYPO3 Quick Links
BitsyBox
April 16th, 2010 by admin No comments »BitsyBox is a hosted content storage platform that offers two products that work in perfect harmony. The first is an easy-to-use web interface that lets site owners edit and update their content. The second is a robust API for developers to quickly access that content from their website or application code.
BitsyBox Main Features
- Create flexible, custom datastores
- Data access through a REST API
- Easy to use interface for editing data
- Built-in Content Delivery Network (CDN)
Quick Links
Pixelsilk
April 16th, 2010 by admin No comments »Pixelsilk is a web-based SEO friendly CMS, content management system, built from the ground up with search engine optimization (SEO) requirements at its core. Pixelsilk CMS is easy to use and allows full HTML and URL control.
Pixelsilk’s SEO-Friendly CMS enables the highest level of SEO possible by ensuring the design, code, content and architecture all provide the search spiders with exactly the information they need most. From keyword-rich, relevant content to title, Meta tags, Pixelsilk provides Search Advice (patent pending) directly to the editor while content is being created or modified—not bolted on as an afterthought.
Pixelsilk Main Features
- Full HTML control
- Interactivity with social media applications
- Open architecture and framework
- Real-time search engine optimization advice
- Theme and navigation flexibility
Quick Links
CushyCMS
April 14th, 2010 by admin 1 comment »CushyCMS is a Content Management Systems (CMS) that is truly simple. It’s free for unlimited users, unlimited changes, unlimited pages and unlimited sites.
It’s built from the ground up with ease of use in mind – for both content editors and designers. It’s such a simple CMS that it takes less than 3 minutes for a web designer to implement. No PHP or ASP required for this CMS. If you can add CSS classes to HTML tags then you can implement CushyCMS. It’s also a hosted CMS, so no installation or maintenance is needed either.
Content editors will love managing their content with this system. No training required, it’s just that easy.
And it is, and always will be a free CMS. You can use it for professional use, you can even charge your clients to use it. The only catch is that if you make it your own CMS solution, with your own brand, then you’ll need to pay for the pro plan.