News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Thijssen:
Debugging Symfony components
January 02, 2015 @ 09:44:53

Joshua Thijssen has a quick new post today talking about debugging Symfony components, sharing a simple but useful hint.

Don't you hate it when you are stepping through your debugger during a Symfony application debug session, and all of a sudden it cannot find files anymore as Symfony uses code located in the bootstrap.php.cache instead of the actual Symfony component. Symfony creates these cache-classes in order to speed up execution, but it makes that xdebug cannot find the correct code to step through anymore.

He found a solution in a few changes to his "app_dev.php" bootstrap file to alter the location of the autoloader and disable cache loading. This prevents issues with Symfony trying to access cached versions and use the actual files and locations, making debuggers much more happy.

0 comments voice your opinion now!
debug symfony component tip cache disable dev

Link: https://www.adayinthelifeof.nl/2014/12/31/debugging-symfony-components/

Rob Allen:
SSL certificate verification on PHP 5.6
December 23, 2014 @ 12:15:41

Rob Allen has a quick tip posted today about SSL certificate verification in PHP 5.6 and things that need to be updated thanks to recent improvements in PHP's SSL handling.

I recently updated my local OS X Zend Server installation to PHP 5.6 and when I ran composer self-update, I got this error message: "The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed" [...] Googling around, I finally worked out that there have been various SSL improvements in PHP 5.6 and that the problem was that it couldn't find any OpenSSL certificates on my system. This isn't a total surprise as OS X has been moving away from using OpenSSL internally in favour of its own libraries.

To resolve the issue he found where PHP was looking for certificates (using openssl_get_cert_locations) and how a quick "brew install" of the needed OpenSSL handling resolved the issue. Then, in the php.ini file a quick update to the "openssl.cafile" path points it to the right certificate.

0 comments voice your opinion now!
certificate validation ssl openssl php56 tip fix

Link: http://akrabat.com/php/ssl-certificate-verification-on-php-5-6/

Matthew Weier O'Phinney:
Deployment with Zend Server (Part 8 of 8)
September 18, 2014 @ 11:20:04

Matthew Weier O'Phinney has posted the last part of his "Deployment with Zend Server" series with part eight. This part focuses on some hints around the actual deployment and automation.

This is the final in a series of eight posts detailing tips on deploying to Zend Server. Zend Server SDK to deploy your Zend Server deployment packages (ZPKs) from the command line. Today, I'll detail how I automate deployment with zf-deploy and zs-client (the Zend Server SDK), and wrap up the series with some closing thoughts.

He quickly summarizes the previous parts of the series as individual steps and wonders if there's a better way than doing each of them manually. He shows exactly this with the automation handling that zf-deploy and zs-client offer combined with a make script defining steps for the deploy, ZPK update and a cleanup/Composer update task.

0 comments voice your opinion now!
deployment zendserver tip series part8 automation make command zfdeploy zsclient

Link: https://mwop.net/blog/2014-09-18-zend-server-deployment-part-8.html

Matthew Weier O'Phinney:
Deployment with Zend Server (Part 2 of 8)
August 29, 2014 @ 11:55:04

Matthew Weier O'Phinney has posted the second part of his series with some tips around application deployment with Zend Server. In this latest post he shares his second tip related to recurring jobs.

This is the second in a series of eight posts detailing tips on deploying to Zend Server.The previous post in the series detailed getting started with zf-deploy to create ZPK packages to deploy to Zend Server. Today, I'm looking at how to created scheduled/recurring jobs using Zend Server's Job Queue; think of this as application-level cronjobs.

Instead of running the jobs as cron tasks (which may or may not be installed if there's multiple servers), he opts for a software-based approach. He walks you through the use of the Zend Server Job Queue to create a simple reoccurring execution to run a PHP script at a certain time. He includes some code examples with one showing just the scheduling of a job and the other showing how to detach previous jobs and add only the new ones that weren't scheduled before.

0 comments voice your opinion now!
deployment zendserver tip series part2 cron reoccurring jobs

Link: http://mwop.net/blog/2014-08-28-zend-server-deployment-part-2.html

Paul Jones' Blog:
Interview Tip Avoid Mentioning PHP Frameworks
March 20, 2012 @ 09:26:19

Paul Jones has offered a tip he thinks will help you in future interviews for a software development position - don't mention frameworks.

If the job description does not mention "Framework X," you should probably avoid answering that you use "Framework X" to solve the problem presented to you by the interviewer. If I ask you to perform a simple task, such as parsing a string in a well-known format, saying "Framework X does that for me" is likely to be seen as a negative. You should be able to do the simple things in PHP itself (e.g. parsing strings).

He points out that, as someone currently in the interview process, he is frustrated by the fact that some developers rely so heavily on the functionality that frameworks give them that they don't know how to do some of the most basic tasks outside of them.

Saying that you use a feature of "Framework X" for simple things is a negative. It sounds like you're dependent on that framework for basic tasks. That means we (the employers) will need to train you how to do it without that framework, and that's a hassle for us.
0 comments voice your opinion now!
interview tip developer framework avoid knowledge


Anson Cheung's Blog:
Top 10 PHP Best Security Practices for Sys Admins
January 30, 2012 @ 14:52:26

In this recent post to his blog Anson Cheung provides a set of helpful hints for sysadmins to follow when installing (or just securing) the PHP installations on their systems.

PHP is widely used for various of web development. However, misconfigured server-side scripting would create all sorts of problem. And here are php security best practices that you should aware when configuring PHP securely. Nowadays most of the web servers are operated under Linux environment (like: Ubuntu, Debian...etc). Hence, in the following article, I am going to use list top 10 ways to enhance PHP Security Best Practices under Linux environment.

His tips include:

  • Reducing the built-in PHP modules
  • Logging all PHP errors
  • Disabling remote code execution
  • Disabling dangerous PHP functions
  • Write protection on Apache, PHP & MySQL configuration files
0 comments voice your opinion now!
sysadmin security install tip bestpractices configuration


Michael Nitschinger's Blog:
Quick Tip Lithium Redirect
September 16, 2011 @ 10:02:21

Michael Nitschinger has a "quick tip" posted in this new entry to his blog - how to handle a redirect in a Lithium-framework based application.

While migrating pastium over to MongoDB (from CouchDB), I found [a] snippet in the routes.php file [that makes it so] when the user enters the application via the root url (/), he instantly gets redirected to /pastes/add (or a different URL if you have custom routes configured). This may seem ok at first, but there's a problem. It doesn't take URLs into account that don't live directly under the document root.

The snippet he references and others showing how to correct the issue are included - replacing the location array controller/action information with the static class information for the route in a match() call. For more information on the routing in Lithium, see these manual pages.

0 comments voice your opinion now!
lithium framework tip redirect method


PHPBuilder.com:
6 PHP Performance Tips for Producing Highly Optimized Code
July 13, 2011 @ 09:34:17

On PHPBuilder.com today Jason Gilmore offers some performance tips to make highly optimized code without having to use something like HipHop to get closer to the speeds you might need.

While HipHop may seem a rather esoteric solution to the performance problem, a method lies within the perceived madness; maintaining the website logic using PHP code allows Facebook to maintain a code base which remains accessible to a larger number of developers, with the added bonus of being able to deploy blazing fast C++ code. Of course, incorporating HipHop into your infrastructure might not be ideal, but that shouldn't stop you from striving to produce highly optimized PHP code. Read on to learn more about several straightforward steps you can take to boost PHP performance.

Some of the tips included in his list are obvious but could easily be overlooked like:

  • Upgrade your PHP distribution
  • Tone down error reporting
  • Use PHP's native extensions whenever possible
  • Use a PHP accelerator

Take a look at the full post for other suggestions and descriptions of each.

1 comment voice your opinion now!
performance tip optimized code application suggestion


PHPBuilder.com:
Top 10 phpMyAdmin Tips and Tricks You May Not Know
February 09, 2011 @ 12:41:54

In this new article on PHPBuilder.com today, they share ten handy tips that you might not have known you could do with the phpMyAdmin tool.

Despite approaching its 12th birthday, phpMyAdmin is still under active development, with at least one significant version released every year since the project's inception. In fact even after almost a decade of use I still marvel over discovering features which I had no idea existed. In this article I thought I'd highlight 10 useful phpMyAdmin features which may have escaped you during your daily interaction with this fantastic utility.

Making the list of their ten tips are things like:

  • Manage User Privileges
  • Change the Theme
  • Monitor Server Status
  • Create PDF Relational Diagrams
  • Use Your Native Language
0 comments voice your opinion now!
phpmyadmin tip trick tutorial


Derek Allard's Blog:
5 Things You May Not Know About CodeIgniter
January 20, 2011 @ 12:04:18

Derek Allard has a new post to his blog today sharing five things about CodeIgniter you might not know - things he's discovered in his CI work over the past few years.

Every time I start a new project with CodeIgniter I find myself tasked with something, often a small thing, that I've never "solved" before. I try to use these moments as opportunities to explore PHP and CodeIgniter a little bit deeper. Often times I surprise myself by learning something new, or surprise myself at having forgotten something relatively "basic". Here are 5 things I've discovered or rediscovered in the last few years. If you're a CI veteran, some of these will be old news to you, and some might be new.

Here's his list of five handy tips:

  • There is an optional second parameter in $this->uri->segment()
  • Any library can have a configuration file
  • remove_invisible_characters()
  • CodeIgniter 2 allows for libraries to have drivers
  • Views can be returned as data with a third parameter

You can find out more about the CodeIgniter framework on its website.

0 comments voice your opinion now!
codeigniter tip discover framework



Community Events

Don't see your event here?
Let us know!


symfony2 opinion library release application conference interview voicesoftheelephpant framework api series community php7 podcast laravel performance composer example version introduction

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework