News Feed
Sections

News Archive
feed this:

Paul Jones' Blog:
Exceptional command-line PHP
August 08, 2008 @ 09:34:59

In a new post to his blog, Paul Jones anout a small issue when working with the PHP 5.2.5 command line functionality - a segfault if you extend the Exception class.

When executing code at the command line using php -r and PHP 5.2.5, be sure not to extend the Exception class. It will cause a segmentation fault.

He includes examples of the issue that would cause the problem and the bug he's filed in an effort to get it fixed.

0 comments voice your opinion now!
exception commandline php5 extend segfault



Amir Saied's Blog:
PEAR bash completion
July 28, 2008 @ 12:08:29

Amir Saied recently posted a handy little tool for the PEAR users out there - a bash script that handles tab completion for you.

Lately I've been playing alot with the PEAR CLI. The one annoying thing I noticed the most was its lack of tab completion that I'm used to from the shell. It turns out that this feature is very easy to add, in the bash at least.

It will finish off the PEAR commands for you and expand out the PEAR package names and discovered channels when it finds a match. You can download the package here.

0 comments voice your opinion now!
pear bash commandline completion tab package name channel


Joshua Eichorn's Blog:
New code in PEAR2
June 10, 2008 @ 13:49:20

Joshua Eichorn has blogged about three new projects he's added to the PEAR2 repository:

Not really what I expected to be the first round of new code, but its nice to be setting up access for people. Oh and remember PEAR2 is targeted at php 5.3 but not everything is namespaced yet since not everyone wants to run snapshots of php for development.

You can find more of the packages on the PEAR2 svn repository.

0 comments voice your opinion now!
pear2 code svn commandline template dwoo engine


Developer Tutorials Blog:
Running PHP cron jobs - regular scheduled tasks in PHP
May 16, 2008 @ 09:32:25

On the Developer Tutorials blog, Akash Mehta has posted an introduction to working with command-line PHP scripts and cron jobs for site automation.

Scheduled tasks are a fairly common feature in modern web applications. From cleaning out caches every 24 hours to checking subscription periods and even generating reports, more web applications live by the clock than ever before. But how do we schedule the execution of a PHP script on the server side?

He shows the two key things to getting it working - an example of a command-line call to a PHP script (executed through his /usr/bin/php) and an example of a line from a crontab showing how to execute the script at midnight every day.

1 comment voice your opinion now!
cron job crontab commandline execute schedule task tutorial


Developer Tutorials Blog:
Testing PHP with the interactive shell
May 12, 2008 @ 07:57:34

Akash Mehta shares a helpful hint in this new post to the Developer Tutorials Blog today - testing out PHP code via the command line PHP binary.

Thankfully, PHP provides the interactive shell, allowing you to test out PHP interactively with immediate feedback. Here's how to take advantage of this mature feature of PHP.

With the help of the "-a" flag on the command line, the PHP binary will hand you an environment where you can code PHP and instantly see the results. He does mention a few quirks that make it different than working with PHP through a web server, namely moving in and out of code blocks and remembering to finish out with a semi-colon when the line is done.

0 comments voice your opinion now!
test interactive shell binary tutorial commandline


Debuggable Blog:
Running Tests from The Commandline in CakePHP
May 08, 2008 @ 10:27:41

New on the Debuggable blog today there's this post from Tim Koschutzki about a new feature he's contributed back to the CakePHP project. It allows you to run tests on the command line without having to worry about loading up a web interface to check your code.

It allows you to run all of the following: all core testcases at once, all core test groups, each core test case individually, all application-specific testcases at once, all application-specific test groups and each core test case individually. It also supports plugins, which means you can run plugin cases and groups.

He includes some samples of how it works - a few command line calls and what the output looks like.

0 comments voice your opinion now!
test unittest commandline cakephp framework testsuite


Sebastian Bergmann's Blog:
Test Runner Improvement in PHPUnit 3.3
April 11, 2008 @ 09:46:29

Sebastian Bergmann has posted some details about an update that's been made to the test runner for the PHPUnit (3.3) unit testing suite - an allowance for directories instead of just files on the command line.

Given a directory, the test runner will recursively scan the directory for *Test.php files, build a test suite out of the *Test classes, and run it.

PHPUnit is framework that makes writing tests for your code easy and also includes functionality to run the tests and analyze their results.

0 comments voice your opinion now!
test runner improvement phpunit commandline directory file


Zend Developer Zone:
Zend Framework- Coming soon to a Command Line near You!
December 24, 2007 @ 08:38:00

According to the Zend Developer Zone, the Zend Framework is going to the even more powerful in the future with the inclusion of command line functionality.

So, without further adieu, it is my pleasure to announce that Zend Framework 1.5 will include a robust, powerful, and- yes- 15-minute-demo-enabled command line interface for code generation!

They've set up a default structure (that's "recommended") but doesn't have to be strictly adhered to. They know how most developers have structured their applications and made it accordingly. There's three proposals in the group - the Zend_Console, Zend_Build component and the Zend_Build for Core.

0 comments voice your opinion now!
zendframework commandline zendconsole zendbuild component zendframework commandline zendconsole zendbuild component


Sebastian Bergmann's Blog:
TestNG-style Grouping of Tests
September 04, 2007 @ 08:12:00

Sebastian Bergmann demonstrates another feature of the popular PHPUnit unit testing software in new post to his blog, specifically the TestNG-style of test.

Starting with version 3.2, PHPUnit has support for TestNG-style @grouping of tests.

He includes an example of the style, a test case that, through the command line testing tool, can be called in portions depending on the need.

0 comments voice your opinion now!
testng unittest phpunit support group commandline testng unittest phpunit support group commandline


Developer.com:
SQLite The Sensible Database Solution
August 29, 2007 @ 12:07:00

On Developer.com today, Jason Gilmore has written up a tutorial that introduces one of the handy features that came with upgrading to PHP5 - SQLite support:

One such solution is SQLite, a fully-featured relational database that, at just 250KB, is by itself able to easily fit on a floppy disk yet is capable of managing terabyte-sized databases. [...] In this tutorial, I'll introduce SQLite, showing you how this database can offer you maximum return with minimal investment.

He introduces the library by showing how it can be used from the command line (along with an example database) and how to turn on support for it in PHP and make queries in the normal SQL syntax.

0 comments voice your opinion now!
sqlite tutorial commandline module extension php5 sqlite tutorial commandline module extension php5



Community Events











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


ajax releases security book job release package PHP5 cakephp code conference zend framework database example zendframework developer PEAR application mysql

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