Posts tagged with ‘PHP’

Symfony: How to query using Criteria OR

advertisement

I’m looking for way to do a simple query using criteria OR in symfony framework. The official documentation does not covers the sql query criteria for OR statement. After googling for while, there is some reference from the Propel Guide

To perform a simple SQL query with OR criteria is a bit complicated in symfony or i can say in Propel. Here’s the example of how to perform the SQL query for:

Continue reading Symfony: How to query using Criteria OR »

Install eAccelerator to Optimize PHP performance

advertisement

php, php cache, php accelerator, php tuningServer load increase? looking for ways to optimize your php performance? if you have php optimization problem, you should try PHP eAccelerator. PHP eAccelerator is a free open source PHP accelerator, optimizer and dynamic content cache module that specially build to optimize php performance. According to php eaccelerator official site, php accelerator able to speed up the php code by 1-10 times and reduce server load.

How PHP eAccelerator able to speed up php code and reduce server load?

PHP eAccelerator works this way, whenever there is request to a file, PHP eAccelerator will parse the php file and cache them in their compiled state in the shared memory. So when the next request come, php eAccelerator will serve the request using the cache and it completely eliminated the compile state, so it will speed up php execution. (*Files that can’t fit in shared memory are cached on disk only.)

Interested with PHP eAccelerator? How to install PHP eAccelerator?

Continue reading Install eAccelerator to Optimize PHP performance »

PHP Programming: The difference between require() and include()

advertisement

php, programming, php programming, open source, php function
Many friends ask me what’s the difference between require() and include(). Here is the explaination from PHP manual.

From PHP manual:-

require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, don’t hesitate to use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless. Be sure to have an appropriate include_path setting as well.

Continue reading PHP Programming: The difference between require() and include() »