PHP CLI script – show errors
If you are struggling with a PHP CLI script and the errors are not showing: php -d display_errors <script_filename.php>
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
If you are struggling with a PHP CLI script and the errors are not showing: php -d display_errors <script_filename.php>
I always forget the little bit about error reporting, so here is a step by step guide to getting Xdebug running on you Ubuntu PHP installation. 1) Install PECL (if…
PEAR (PHP Extension and Application Repository) is a bunch of extensions you can install on your server to uitilise clever ‘extras’ that other people have spent their time writing. To…
I was just playing around with PHP’s ability to create compressed files, and I had a problem. My ZIP file was not getting created but I wasn’t getting any errors.…
Was getting the above error in my Doctrine project, turned out I had used a single quote in the ORM Annotations: /** * @ORM\Column(type='integer', name='row_number') * @var int */ protected…
Have had some serious problems getting this working, but after a 4 hour head bashing session, we’ve cracked it. CREATE TABLE inventory( inventory_id INT AUTO_INCREMENT, discriminator_column VARCHAR(20), category VARCHAR(50) NOT…
When creating a Zend Framework site, its always best to keep the Zend library as an external source. This way you can keep the branch up-to-date with the release of…
Think: “What am I testing?” 1) Set-up Instantiate your class Look for dependencies, are there any that need mocking? 2) Exercise We test our real objects that need testing, or…
To pass data from your controller, to a Zend_Form, you can utilise the config parameters: $this->view->form = new Contact_Edit_Form(array('contactName' => 'Chris')); This will pass a very simple array to the…
When using a CLI script with options, I like to use the Zend_Console. If my options are as follows: $console = new Zend_Console_Getopt( array( 'i-s' => 'test option 1', 'e'…