You are here

php

One of our Wordpress website was running very slow, so I have been asked to diagnose the application. The website was running in upwards of 6 seconds to load the homepage, and 8+ seconds to load woocommerce product pages. There are several debugging and profiling tools available in PHP realm, and Xdebug is an excellent choice. New Relic (free and premium versions) is another choice for profiling and debugging PHP application.

One of the common symptom being seen during PHP development is White Screen of Death, a blank screen instead of expected page. If you "View Source" on white page, it will often contains no title, no header or body and there are no errors - a simple blank page.

We have been using a code-signed JumpLoader with PHP upload handler for several years without any issues. For those users with Java 7 update 21 and above, JumpLoader is now throwing Security Exception, Missing required Permissions manifest attribute in main jar: due to additional security mechanism built into Java.

ZF2 provides HeadScript and InlineScript Helpers to inject <script> elements in the template typically located inside the <head> tag, or at the very bottom of the closing </body> tag. To inject Title, Meta Keywords, Meta Description, headScript, and inlineScript in the view:

Using Doctrine as an ORM to persist your data significantly lowers your overhead in managing your database. However, if you're just getting started with Doctrine, you'll have to invest in moderate time to overcome learning curve. Here is some of not so obvious tricks you'll have to learn as a beginner to utilize Doctring.

I am kicking off a new PHP project with the Zend Framework 2 (ZF2), and chose to use Doctrine as the persistence layer with ORM capabilities. Knowing that I need two Zend modules for Doctrine support, I've cloned the two modules (DoctrineModule and DoctrineORMModule) from GitHub to enable doctrine support in my ZF2 project. Oops, just installing those two Zend modules from GitHub do not make doctrine work! What am I doing wrong? Do I need a core Doctrine library from doctrine-project.org installed in addition to those two modules in order to make this work in ZF2?

I have been involved in software development for over 20 years, and have used various version control software including SCCS, CVS, Perforce, Clearcase, Visual Sourcesafe, and SVN. Over time, SCM trend has changed from file locking mechanism to distributed version control and GIT is gaining popularity with growing users. As a software engineer, SCM is critical part of your daily chores but you don't want to spend much time maintaining it.

I have newly acquainted with ZF2, and played with EdpModuleLayouts to configure different layout for each module. For someone with very limited exposure with ZF2, the instruction provided in EdpModuleLayouts is not quite enough. I've spent about an hour to make this simple thing work, and sharing my experience with others who may run into similar challenge.

ZF2 introduces a new routing for the framework which is similar to ZF1, but has slightly different semantics. The skeleton application ships with a default Application level router which takes matching controller/action to /application/controller/action URI. If you wish to keep it backward compatible with ZF1 type of matching, you may want to make the following changes to the module/Application/config/module.config.php file as below: