News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Evert Pot:
MySQL 5.6 BOOL behavior when using PDO and prepared statements
December 05, 2013 @ 10:37:42

Evert Pot was seeing some weird issues with his MySQL BOOL usage via PDO when he upgraded to one of the latest versions (5.6). Thankfully, he's shared his solution to the problem as well as the symptoms he was seeing when it was causing problems.

I recently updated my workstation to run MySQL 5.6.13. It didn't take very long for things to start breaking, and since I couldn't find any other information about this on the web, I figured this may be useful to someone else. The main error that started popping up was: "Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'my_bool' at row 1' in test.php" This exception happens under the condition that you use PDO, prepared statements and booleans.

He includes a small sample script to reproduce the issue and points out the issue - the default casting of prepared values to strings in prepared statements with PDO bound parameters. He shows two "relatively easy solutions" to the problem - either using integers instead of the true/false PHP boolean or specifying a type with the bindValue call.

0 comments voice your opinion now!
mysql upgrade boolean field pdo prepared statement

Link: http://evertpot.com/mysql-bool-behavior-and-php/

PHP.net:
PHP 5.4.22 Released
November 15, 2013 @ 10:53:07

PHP.net has officially announced the release of PHP 5.4.22, the latest maintenance release for the PHP 5.4.x series:

The PHP development team announces the immediate availability of PHP 5.4.22. About 10 bugs were fixed. All PHP 5.4 users are encouraged to upgrade to this version.

Fixes in this release include:

  • Improved performance of array_merge() and func_get_args()
  • Whitespace handling in json_decode
  • OPCache increase for the max_accelerated_files
  • PDO fix when the constructor throws an exception

You can download this release from the usual sources - the main downloads page or windows.php.net.

0 comments voice your opinion now!
language release bugfix upgrade

Link: http://php.net/index.php#id2013-11-14-3

PHP.net:
PHP 5.5.6 is now available
November 14, 2013 @ 10:07:29

As announced on the main PHP.net site today, the latest version in the PHP 5.5.x series has been made available for download - PHP 5.5.6:

The PHP development team announces the immediate availability of PHP 5.5.6. This release fixes some bugs against PHP 5.5.5, and adds some performance improvements.

Bugfixes in this latest release are updates to:

  • the built-in CLI server
  • the DateTime extension
  • Updates to the filter extension
  • Several OPCache-related fixes
  • ...and more

As always, you can grab this latest download from the main downloads page or from windows.php.net for the Windows users out there.

0 comments voice your opinion now!
language release bugfix upgrade

Link: http://php.net/archive/2013.php#id2013-11-14-1

PHP.net:
PHP 5.4.21 Released
October 18, 2013 @ 09:46:49

Via PHP.net today there's an announcement about the latest release in the PHP 5.4.x series - PHP 5.4.21:

The PHP development team announces the immediate availability of PHP 5.4.21. About 10 bugs were fixed. All PHP 5.4 users are encouraged to upgrade to this version.

As always, you can download the latest source from the main downloads page or the Windows binaries from windows.php.net. Bug fixes in this release include updates to the CLI server, Datetime, DBA extension, IMAP and Filtering.

0 comments voice your opinion now!
language release bugfix upgrade

Link: http://php.net/index.php#id2013-10-17-1

PHP.net:
PHP 5.4.20 Released
September 20, 2013 @ 09:33:13

The PHP development group has officially announced the latest release in the PHP 5.4.x series - PHP 5.4.20. It's mostly a bugfix release, but users are encouraged to upgrade.

Changes in this new release include fixes for:

  • A segfault in the CLI Apache SAPI
  • Segfault on using traits with get_class_methods
  • The use of maxint in array_sum
  • A failure on build with DTrace
  • An issue with "make install" in CGI mode

As always, you can download the latest version from the downloads page or, for the Windows users out there, windows.php.net.

0 comments voice your opinion now!
language release bugfix upgrade windows

Link: http://php.net/index.php#id2013-09-19-2

Simon Champion:
PHP Upgrade Broke My Data Importer
June 27, 2013 @ 12:13:45

In his latest post Simon Champion recounts some of the issues he had when upgrading to PHP 5.4, what's usually a smooth transition from PHP 5.3. His specific problem came in a difference between the previous mysql_query call and the more-correct PDO usage.

Our office is in the thoes of a large-scale upgrade of the servers in our data center. The new version of Debian (version 7, or "Wheezy") has been officially released, having been in beta for the last few millenia, and our Ops team are slowly installing it across all our servers. This is great news, as it means we get to upgrade to PHP 5.4. Woohoo! New shininess. [...] We were ready. The upgrade should have been a breeze. But it wasn't.

He talks about his process of digging through the code trying to figure out why a call to import a CSV file into MySQL was failing. Their Data Importer component started failing with an error from MySQL about the "LOAD INFILE" not being allowed for use. He shares a "work around" that's not ideal (using exec) that manually imports the file into the database. He does point out that it could be something Debian-specific as they don't upgrade the version, just apply security patches retroactively.

We're making an effort to stick to modern PHP coding standards, so we're using PDO throughout, which makes is all the more galling. [...] Given that we do have a work-around now and everything is back up and running, I'm going to have to let this one drop; I don't have the time to try chasing it any more. But I hope this blog post will prove useful to anyone else having the same issue.
0 comments voice your opinion now!
upgrade data importer mysql infile load pdo mysqlquery

Link: http://spudley.com/blog/php-upgrade-broke-my-data-importer

Johannes Schlüter:
PHP 5.5 is out, what's up with 5.4 and 5.3?
June 24, 2013 @ 09:25:47

Johannes Schlüter has a new post for those wondering what's going to happen to PHP 5.3 and 5.4 now that PHP 5.5 has been released.

Yay, finally we released PHP 5.5, which is a new big release for PHP. In preparation for this I yesterday sent out a mail to the PHP core developers stating that the "PHP-5.3 BRANCH IS CLOSED NOW" [...] What this means for users of PHP is that they can continue using PHP 5.3 and when upgrades come they are very low risk of breaking anything (we always try not to break anything, but any person's bug might be another person's feature) so they should be applicable easily and applied fast.

So, PHP 5.3 users can upgrade in the 5.3.x series without having to worry too much about breakage. PHP 5.4 users should be able to easily upgrade to 5.5 without many issues too: "PHP 5.5 also mostly uses the same code as 5.4 with a few extra features."

0 comments voice your opinion now!
language release upgrade older version status

Link: http://schlueters.de/blog/archives/173-PHP-5.5-is-out,-whats-up-with-5.4-and-5.3.html

Symfony Blog:
Upgrading your Symfony Projects the easy Way
June 12, 2013 @ 10:57:49

On the Symfony blog today there's a new post from Fabien Potencier talking about the upgrade path to keep your Symfony projects up to date. He points out that in the pre-Composer days it was more difficult, but thanks to this handy tool, it's a much easier task.

In the old Symfony 2.0.x days, at a time when Composer did not exist, upgrading a project from one minor version of Symfony to the next one was not that easy. [...] Fast forward to the Composer world. Composer is used by Symfony since version 2.1, but as we were the very first adopter, and because Composer and the Symfony ecosystem were not stable yet, it was still awkward. [...] Fast forward to Symfony 2.3. As of Symfony 2.3, the minimum stability level has been raised to stable.

This stability means that all of the libraries and tools that Symfony 2.3 depends on are in their "stable" state as well. Included in the post are the commands to update your Symfony install and what it looks like when the update from 2.3.0 to 2.3.1 happens. He finishes off the post with a few recommendations about how to use Composer to keep things stable (use "stable", define version constraints and run the update without fear of breakage).

0 comments voice your opinion now!
symfony upgrade composer stable component

Link: http://symfony.com/blog/upgrading-your-symfony-projects-the-easy-way

Phil Sturgeon:
Pick PHP Requirements for Packages Responsibly
March 25, 2013 @ 11:22:11

In this recent post to his site Phil Sturgeon has a reminder that you should select the dependencies for your packages wisely, and not just because they're "cool."

When I say "make sure it is worth it" I mean, don't just switch your arrays from array() to [] just because it looks cool. That was the extent of my original tweet, because I've seen a few packages doing that and it annoyed me immensely. [...] Suffice it to say, if you require a user to upgrade their version of PHP simply so you can use some syntactical sugar inside a package that nobody else is even going to be looking at, then you're an idiot. Beyond that, you're actually hurting the community.

He notes that, by requiring users that are currently only at 3.1% of PHP installs to upgrade to 5.4 just to use your library is a quick way to not have your library used. He points out that PHP 5.4 is "more than just []" for arrays and includes a reminder that several projects are still in PHP 5.3-compatibility mode just because that's the widest audience. He also briefly touches on the "push it forward" comments that people have used to justify 5.4-only packages, but notes that it's still not as much up to the developer as it is the web host.

0 comments voice your opinion now!
requirements responsibility features version webhosting upgrade composer


Greg Freeman:
Steps to Take When you Know your PHP Site has been Hacked
March 07, 2013 @ 09:53:02

Greg Freeman has posted the second part of his "hacked PHP application" series (part one is here). In this new post he looks at the aftermath - what to do and check to do cleanup and fixes so it doesn't happen again.

This is a follow up post from my previous post "How to Tell if Your PHP Site has been Hacked or Compromised". This post will discuss some the first steps you should take when you have identified that your site has been compromised. The first sections discuss a few points that are not relevant to everyone, the later sections will discuss how to fix the exploits.

He includes a list of things to think about including:

  • What kind of hosting you use (and if that contributed)
  • The option to redirect all requests for your site to one page
  • Get a list of all PHP files to locate something malicious
  • Locating "non-PHP PHP files"
  • Finding files with possible malicious content

He also includes a few suggestions to help prevent issues in the future - update to the latest versions, patch your code, rethinking your permissions and monitoring for potential repeat attacks.

0 comments voice your opinion now!
hack compromise steps correction fix upgrade exploit



Community Events











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


package performance database framework language application composer hhvm support podcast component security hack unittest introduction opinion release facebook install symfony2

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