PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 2841 to 2860 of 6889

Using MySQL multiple statements with PHP mysqli

Using MySQL multiple statements with PHP mysqli
The series Using X with PHP mysqli continues. After notes on calling stored procedures and using prepared statements, its time for a multiple statement quickstart. A mighty tool, if used with carea Using Multiple Statements with mysqli MySQL optionally allows having multiple statements in one statement string. Sending multiple statements at once reduces client-server round trips but requires special handling. Multiple statements or multi queries must be executed with mysqli_multi_query(). The...

Multiple PHP versions set-up

Multiple PHP versions set-up
Multiple PHP versions set-up London, UK Monday, November 7th 2011, 09:11 GMT For many of my projects (both hobby and commercial) I need to support many different PHP configurations. Not only just different PHP versions, but also debug builds, ZTS builds and 32-bit builds. In order to be able to test and build extensions against all those different PHP configurations I have adopted a simple method that I'm sharing with you here. The major part of it is that I use a different installation prefix for...

PHAR and FreeBSD

PHAR and FreeBSD
I noticed that archivers/pecl-phar vanished from the ports tree on one of my FreeBSD servers. Problem?Reasons to remove the port were: the port is unmaintained the port was based on the outdated phar extension from pecl phar (in pecl) contains open security issues The simple solution is to create a new port which of course will use the phar which is bundled in PHP's core. And I will get to that (but feel free to beat me at it ;-)).SolutionIn the meantime, here's a simple solution to get phar on...

PEAR Development on Github

PEAR Development on Github
Like many other projects, many components of PEAR have started a migration to github. We have two primary organisations set up for PEAR and PEAR2. While the existing PEAR packages will continue to use the pear.php.net distribution and bug tracking capabilities; it's never been easier to contribute to a PEAR package - simply fork; add your changes and send us a pull request. If your preferred packages aren't yet on github, please feel free to drop us a line on the pear-dev mailing list.

Building a Tumblelog with Gimme Bar and PHP

Building a Tumblelog with Gimme Bar and PHP
One of the coolest things about working on Gimme Bar has been the opportunity to build a platform. While most folks interact with our service via the web site, the site is just one application built on top of the Gimme Bar content collection and curation system. Our web site interacts with the system via our HTTP API, which is open to everyone, not just our internal team. That means that anyone can build applications on top of our platform to suit their own needs or interests.To demonstrate this, I...

1.1.2-*stable* release of the replication and load balancing plugin for PHP!

1.1.2-*stable* release of the replication and load balancing plugin for PHP!
PECL/mysqlnd 1.1.2-stable has been released. The mysqlnd replication and load balancing plugin for PHP 5.3/5.4 finally got the download label it deserves: stable, ready for production use! PECL/mysqlnd_ms makes using any kind of MySQL database cluster easier. Download PECL/mysqlnd from pecl.php.net Documentation at the PHP Reference Manual Key features The release motto of the 1.1 series is aocover MySQL Replication basics with production qualitya, which shows that the plugin is optimized for...

Kevin Schroeder's Blog: fatal: The remote end hung up unexpectedly

Kevin Schroeder's Blog: fatal: The remote end hung up unexpectedly
Kevin Schroeder has a quick tip for anyone using phpcloud.com and having trouble with git and "remote end hung up" error messages.If you are using phpcloud.com and are experiencing errors with git [...] and you are trying to push large files (not sure what is defined as "large") you may need to change some git settings.He points out two settings - one for Windows and the other for Linux - that increase the buffer size to handle larger files that might be included in your repository.

Ulf Wendel's Blog: Using MySQL stored procedures with PHP mysqli

Ulf Wendel's Blog: Using MySQL stored procedures with PHP mysqli
Ulf Wendel has a new post today with details on using stored procedures with mysqli - not overly difficult if you know how to handle the IN, OUT and INOUT parameters. He includes a few code examples showing how to use them.Out of curiosity I asked another friend, a team lead, how things where going with their PHP MySQL project, for which they had planned to have most of their business logic in stored procedures. I got an email in reply stating something along the lines: "Our developers found that mysqli...

DZone.com: Using a virtual machine to play with multiple versions of PHP

DZone.com: Using a virtual machine to play with multiple versions of PHP
On DZone.com Giorgio Sironi has a new post talking about a development practice that's becoming more and more popular (rather than the old standby of one development platform for all developers) - using virtual machines as reusable, easily renewable platforms. He talks about the process he went through to set up PHP, including the commands used during the process.This is an occasion to learn about a virtualization tool which I'm not familiar with, VirtualBox. The goal is to install PHP 5.4, which is not...

Volker Dusch's Blog: An introduction to PHPUnits @covers annotation

Volker Dusch's Blog: An introduction to PHPUnits @covers annotation
PHPUnit is one of the most widely used unit testing tools for PHP applications. It comes packed with features, some that are commonly used and some not so much. In a new post to his blog today Volker Dusch looks at one specific feature - the "@covers" annotation you can use in your tests' comments to specify which functionality you're actually testing.One of the goals of your test suite and the coverage report is to make you trust in your code base and to remove the fear of changing something that needs...

Using MySQL prepared statements with PHP mysqli

Using MySQL prepared statements with PHP mysqli
Starting with PHP mysqli is easy, if one has some SQL and PHP skills. To get started one needs to know about the specifics of MySQL and a few code snippets. Using MySQL stored procedures with PHP mysqli has found enough readers to begin with a aoquickstarta or aohow-toa series. Take this post with a grain of salt. I have nothing against Prepared Statements as such, but I dislike unreflected blind use. Using prepared statements with mysqli The MySQL database supports prepared statements. A prepared...

Anthony Ferrara's Blog: On PSR-0 Being Included In PHP's Core

Anthony Ferrara's Blog: On PSR-0 Being Included In PHP's Core
In a new post to his blog today Anthony Ferrara looks at the (heated) discussion that's popped up around having the PSR-0 autoloader standard included as a part of the PHP core. He gives his reasons (three of them) why he's not for the decision.Recently there has been a rather heated and intense discussion on whether the PSR-0 autoloader "standard" should be included as part of the PHP core (in ext/spl to be exact). I've tried to stay out of the discussion and have successfully done so. Until today. I...

Site News: Popular Posts for the Week of 11.04.2011

Site News: Popular Posts for the Week of 11.04.2011
Popular posts from PHPDeveloper.org for the past week:Johannes Schmitt's Blog: A New Killer Feature for Symfony2 Security XpertDeveloper.com: Abstract in PHP Community News: ZendCon 2011 Wrap-ups (from a Speaker & Zend) DZone.com: Closure Object Binding in PHP 5.4 Developer Drive: Create Your Own CRUD App with MySQL and PHP PHPBuilder.com: An Early Look at Zend Framework 2.0 ArsMagnaTutorials: FuelPHP Tutorial Videos Ibuildings techPortal: Architecture Patterns: Domain Model and Friends Dave Marshall's...

Using MySQL stored procedures with PHP mysqli

Using MySQL stored procedures with PHP mysqli
A couple of weeks ago a friend of mine asked me how to use MySQL stored procedures with PHP's mysqli API. Out of curiosity I asked another friend, a team lead, how things where going with their PHP MySQL project, for which they had planned to have most of their business logic in stored procedures. I got an email in reply stating something along the lines: "Our developers found that mysqli does not support stored procedures correctly. We use PDO.". Well, the existing documentation from PHP 5.0 times is...

Reddit.com: How do YOU sanitize input?

Reddit.com: How do YOU sanitize input?
On Reddit.com there's a recent post that asks the question How do YOU sanitize input in your PHP applications?I am developing some software for my high school using HTML, CSS, MySQL, and most importantly PHP. [...] So I pose this question, what is YOUR favorite way to sanitize input for inserting, updating, or selecting from a database? Also, is there any way you prefer to verify that input is of a certain type, and only of that type ie, if you're expecting an int or a string, how would you make sure you...

User Group: Seattle User Group Meeting Tonight (3rd) - PHP on Azure & Git

User Group: Seattle User Group Meeting Tonight (3rd) - PHP on Azure & Git
The Seattle PHP User Group is having this month's meeting tonight (the 3rd) starting at 6:30pm at Market Leader, Inc featuring talka from Brian Swan on "PHP on Azure" and Jesse Keating on "Git".Market Leader,Inc. is graciously hosting the venue for Seattle PHP Meetup in Kirkland, WA this month!! In fact, Ariz Jacinto (long-time member & frequent presenter at our Meetups), an employee of Market Leader, Inc., has gone bonkers and lined up a killer night for us all! Note the entrance and then celebrate the...

Henrik Bj&oslashrnskov's Blog: Symfony2: How to do a Wizard (multistep form) with Doctrine2

Henrik Bj&oslashrnskov's Blog: Symfony2: How to do a Wizard (multistep form) with Doctrine2
Henrik Bj&oslashrnskov has a new post with a technique you can use to combine Symfony2 and Doctrine2 to create a multi-step form (a wizard) without having to worry about lost user information between steps.The easy ways is doing it with Javascript and just show/hide the correct fieldsets when needed. The downside with this approach is that the data is only saved and validated once at the end. So if the user reloads the page the entered information is gone. The other way is to have every Step in the...

D-Day is coming to Finland

D-Day is coming to Finland
I'm happy and proud to announce that I will be speaking at the D-Day conference in Finland. I will be doing my "Don't use a screw when you need a nail" talk there, a talk I've done before at Symfony Live in San Francisco and Paris and highly enjoyed doing.

NetTuts.com: Zend Framework from Scratch

NetTuts.com: Zend Framework from Scratch
On NetTuts.com today there's a new tutorial helping you get started with Zend Framework "from scratch". They outline the full process - from download to the creation of a first application.Ready to take your PHP skills to the next level? In this new "From Scratch" series, we'll focus exclusively on Zend Framework, a full-stack PHP framework created by Zend Technologies. First in our tutorial series, is "Getting Started with Zend Framework."The tutorial (executed in a Windows environment) is broken up...

Site News: Blast from the Past - One Year Ago in PHP

Site News: Blast from the Past - One Year Ago in PHP
Here's what was popular in the PHP community one year ago today:Site News: Popular Posts for the Week of 11.05.2010 Juhana Rasanen's Blog: Using MongoDB with CodeIgniter Mashable: 10 Intermediate and Advanced Tips from PHP Masters Community News: PHP-Dev Mailing List - PHP 5.4 alpha Ahmed Shreef's Blog: Soap Web Services in PHP & hint on consuming from .Net Jose da Silva's Blog: Revisiting PHP 5.3 __invoke magic method DZone.com: From Doctrine 1 to Doctrine 2 Project: PHPScenario - A Free Split Testing...

Latest PHP Tweets