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

PHPBuilder.com:
My Automated PHP Scripts for Creating FTP Connections to a Remote Server
June 19, 2012 @ 10:41:57

PHPBuilder.com has posted a new tutorial about creating automated FTP scripts to pull down information from a remote server (using FTP streams).

In 2007 I began working on a website project for an investment company in my hometown of Cleveland, Ohio USA. The purpose of this website was to automatically download financial data of traded securities from two (2) remote Web servers. [...] Both of these PHP scripts were set up on the Web server's "crontab manager" to automatically run at a set time each business day.

Code is included showing how to connect to the remote service (via curl) with a "ftp" stream-based URL as the location. Also included is an example using a fopen call to the URL and inserting the resulting data into their tracking tables. The other script pulls the data out and adds a new record to a transactions table for the current day.

0 comments voice your opinion now!
ftp tutorial connection transaction mysql cron automation


GotoTech.com:
Developer Diary Taming Doctrine's 2000 Flushes
May 02, 2012 @ 10:19:35

In this new post to the GotoTech.com blog Eric Burns talks about a way he's "tamed Doctrine's 2000 flushes" with a wrapper around the EntityManager to make controlling the database flushes simpler.

For my project I decided to use the Doctrine 2 ORM to manage my data layer. We also use this at work, so the biggest reason I chose this was to be able to learn more about Doctrine to help me in my job. But this decision also makes sense for my project because my entity relationships will likely be fairly straightforward for the most part and using an ORM will allow me to make a lot of progress very quickly without (I hope) causing me lots of trouble later on.

His handy wrapper (Data Manager) makes it simpler to perform the flush and still take transactions into consideration. His simple class includes "flush", "commit" and "startTransaction" methods that don't actually perform the flush until the commit is called.

0 comments voice your opinion now!
doctrine flush database wrapper transaction


php|architect:
Transactional Emails for Fun and Profit
November 22, 2011 @ 17:58:33

On the php|architect site there's a recent tutorial from Cal Evans about building a transactional email system with the help of a simple library and the SES system from Amazon.

I love APIs. A well-defined API can make short work of a complex problem. It's even more fun when you find a cool API with a great wrapper to make it simple to use. That's what I found when I started playing with Amazon's Simple Email Service; a tool that was easy to work with, solved a problem I needed solved, and had a simple to use PHP wrapper.

Based on the SES library by Dan Meyers, he includes the code to pull in a simple email template and populate it with the values you want, log in to the Amazon SES service and send the email via the remote service.

0 comments voice your opinion now!
transaction email amazon tutorial ses service api


SitePoint PHP Blog:
MySQL Transactions & Why They Can't Be Emulated in PHP
December 15, 2010 @ 12:47:44

On the SitePoint blog there's a new article from Craig Buckler stating that MySQL transactions can't be emulated in PHP and shouldn't be discounted despite many developers seeing them as not much more than a performance hit.

My recent article, "Top 10 MySQL Mistakes Made by PHP Developers" was far more controversial than I expected. Several of the more intriguing responses were from PHP coders who considered transactions to be an unnecessary overhead. With good-quality PHP code, they argued, you don't need transactions or MySQL's InnoDB storage engine. It's certainly true you don't always need transactions.

He gives an example of a situation where database-based transactions would be very useful (inserting customer information) and points out that, despite the best intentions of developers, reducing as many layers and connections between SQL and code is a good thing. Transactions help you conform to the ACID ideas and keep data integrity by only having things in the database that were successful. He includes a small bit on using transactions as well.

0 comments voice your opinion now!
mysql transaction emulate opinion acid integrity mysql


Brian Swan's Blog:
SQL Server Driver for PHP Connection Options Transaction Isolation Levels
September 09, 2010 @ 13:53:32

On his blog today Brian Swan has posted the results of some of his research on transaction isolation levels in SQL Server PHP applications.

Last week I had the good fortune of presenting at the the Seattle PHP Meet Up on a topic I knew only a little about: transaction isolation levels. It was fun doing the homework to learn more and I'll share what I learned in this post. This post is only somewhat PHP-specific. I'll focus largely on the concepts behind database transactions and isolation levels. Most of the concepts I'll look at are database agnostic (although I will use SQL Server as the vehicle for explaining the concepts) and are supported by most relational database management systems out there (e.g. SQL Server, MySQL, Oracle, DB2, etc.).

He introduces database transactions for those not familiar (a key to understanding the rest of the post) and some PHP code that connects to a SQL Server and begins a transaction to update some banking information. He uses this example to show how to set up isolation levels like "READ UNCOMMITTED", "READ COMMITTED" and "SERIALIZABLE".

0 comments voice your opinion now!
transaction isolation level sqlserver driver tutorial


Community News:
PHP Now Included in WebSphere sMash Build
December 18, 2008 @ 12:01:03

In a new post to her blog Zoe Slattery points out a big step in PHP's presence in systems all around the world - the inclusion of it into the CISC systems.

You probably don't realise it but it's very likely that sometime during the last week you will have have used IBM's CICS technology. [...] Last week PHP made it into CICS, PHP is now being used to build agile front ends and RESTful interfaces for the technology that underpins most of the world's large scale commercial systems. You don't get much more into The Enterprise than that!

IBM made the announcement back on Friday the 12th about the upgrade to the sMash WebSphere software. The update, a SupportPac lets developers run PHP inside of a CICS transaction and can be used to create REST services other applications/interfaces can use to directly communicate with the CICS system.

1 comment voice your opinion now!
smash websphere ibm cics transaction server supportpac


Shaun Oleson's Blog:
Authorize.NET and PHP
November 07, 2008 @ 11:20:59

Shaun Oleson has posted his method (a chunk of code to do it) to connect to the Authorize.NET servers and make a request:

So I've had quite a bit of experience with authorize.NET and PHP and I've found it's difficult to find resources that provide textual examples for integrating the payment processor. I've put together a generic tutorial from documentation that is public. Of course, you will have to specify your Transaction ID and API Login ID. So here you are. If you need assistance or have any questions, feel free to leave a comment.

His example is a large get_auth() function that takes in the credit card information (including billing address) and makes a cURL connection to their servers for the request.

0 comments voice your opinion now!
authorizenet tutorial getuauth curl function transaction api


Christopher Jones' Blog:
New PDO_OCI Attributes
September 19, 2007 @ 09:37:00

Christopher Jones talkes about some updates that he's made to the default PDO functionality of PHP, adding in a few things like pre-fetching and methods to get the details of the database server you're using.

After PHP 5.2.4 shipped and a new release cycle began, I merged a couple of enhancements to PDO_OCI attribute handling. Specifically I added $dbh->getAttribute() support for ATTR_SERVER_VERSION, ATTR_SERVER_INFO, ATTR_CLIENT_VERSION and. ATTR_AUTOCOMMIT. At the moment these are only available in the PHP snapshots on http://snaps.php.net/. Let me know if there are any issues so they can be resolved before the next PHP release.

He gives examples of two things - the pre-fetching functionality, allowing for better optimization for a query, and the transaction management features, making it as simple as a try{} block to test the commit and rollback if needed.

He also mentions other properties/attributes included in the new release - ATTR_PERSISTENT, ATTR_TIMEOUT, ATTR_ORACLE_NULLS, ATTR_CASE and ATTR_ERRMODE, ATTR_SERVER_VERSION and ATTR_CLIENT_VERSION (the last two have examples).

0 comments voice your opinion now!
pdo oci oracle attribute prefetching transaction namagement pdo oci oracle attribute prefetching transaction namagement


Lukas Smith's Blog:
Next MDB2 releases are around the corner
July 18, 2006 @ 05:50:27

Lukas Smith notes in this new blog post that the next releases for his MDB2 package should be just around to corner.

He's been working on several issues:

  • fixing issues with MySQL drivers
  • updating transaction support to add SAVEPOINTS
  • integrating a debug callback mechanism

The only two bug reports I am currently hoping to get resolved before the next release are: a MySQL issue getting the last ID and a problem with an internal datatype.

Keep an eye out for his next release.

1 comment voice your opinion now!
mdb2 database abstraction layer transaction drivers debug callback mdb2 database abstraction layer transaction drivers debug callback



Community Events





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


series configure release wordpress developer refactor interview opinion laravel install community unittest language introduction podcast framework list threedevsandamaybe testing code

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