All posts by 2020media

2020Media is a leading UK web host offering Linux and Windows website hosting. The company specialises in WordPress, Joomla and Drupal support.

WordPress Logging to File

I’ve been doing some Ajax development so wanted to log any errors to a file rather than screen, this is because any messages written into the return from the Ajax call can corrupt the message and the Javascript calling the function cannot interpret the data.

Logging to file could also be useful when debugging very visual things (where you don’t want extra messages) such as themes. Also background scheduled cron jobs are the same as Ajax calls and run with no user interface so you need to send the messages to file not to the screen.

Although it is possible to configure the logging modes yourself via php.ini or .htaccess, WordPress sets up some constants in the WP_CONFIG.php file which make it simpler to setup debug logging to file.

the wp-config.php file
wp-config.php

The setting first is the master control for debugging.

define('WP_DEBUG', true);

Without this setting nothing will get logged.
The next setting is

define('WP_DEBUG_LOG', true);

This tells WordPress to log everything to the /wp-content/debug.log file, if you want to log to an alternative location do not include this setting and use the settings described in the first reference below.Finally we need to turn off the display of setting to the user (or Ajax call) using the following setting

 define('WP_DEBUG_DISPLAY', false);

if you set these three settings then you should have logging to file. It’s worth turning this off once your debugging session has finished as the file can get quite large quite quickly.
Further reference

http://digwp.com/2009/07/monitor-php-errors-wordpress/
http://codex.wordpress.org/Debugging_in_WordPress
http://digwp.com/2009/07/monitor-php-errors-wordpress/

CiviCRM London meetup April 2013

It’s London Meetup time again next Wednesday 24th April. Do come along! Registration and more info here: http://civicrm.org/civicrm/event/info?reset=1&id=293

Here’s the agenda so far:

  • Welcome & introductions – Dave Melkman
  • First Session – CiviMail – Jamie Novick
  • Second Seesion – Surveys using webform & CiviMail – Owen (LLR)
  • Break (15 mins)
  • Third session – CiviCRM on a shoestring – Implementation with tiny budgets – George Steven (LMS)
  • Fourth Session – Community update – TBC
  • Fifth Session – CiviBooking – Jamie Novick
  • CiviCRM Open Workshop

What is CiviCRM? Find out here

Joomla User Group April 2013

joomladayA quick roundup of the last London Joomla User group meeting, which took place on Tuesday 16 April 2013.

The meeting was streamed for the first time, as an experiment but the feedback from the tester was positive so hopefully remote participation will become availabe in future months.

Our main discussion centred around future developments in Joomla. Chris Davenport, one of the main Joomla developers, has made a major push to create a Web Services API for Joomla. He argues, Joomla really needs this to allow data to be consumed across a wide array of platforms and devices. As an example a native mobile app would benefit from a true API to Joomla rather than the usual hodge podge of techniques that are practically written from scratch each time. He’s created a Kickstarter project to raise some funds.

In related news, Joomla have recently made announcement saying the Joomla platform is being renamed a framework. This has apparently been done to allow a faster development of the underlying Joomla codebase, of which the Joomla CMS that is what we all use, is just an application of that codebase. The idea Joomla can be used for other things besides websites.

Our discussions went to the usual problem solving open forum and there were lots of good questions and suggested solutions.

Of note was a Firefox plugin called User Agent Switcher – this allows you to appear to sites as (for example) Googlebot – the search engines directory spider. This can be of particular use to track down malware. Some malware that infects Joomla/PHP sites only reveals itself to Googlebot in an attempt to poison the search results.

Security was a topic revisited and Login Failed Log was mentioned – though this is more for information than prevention. Basic security measure like using a complex password and not using the default username of admin or administrator were critical.

Other items mentioned in passing includes:

What is Joomla?

Joomla is one of the top 3 most popular web content management systems on the planet and it currently powers almost 3% of all the world’s websites.  It is an entirely community-driven project and does not employ any paid staff to work on its development.  It is mostly written in PHP and is available for free under the GNU/GPL v2 or later license.  You can find out more here: www.joomla.org.

2020Media is a UK Joomla host that offers specialist knowledge of Joomla including web hosting, migrations and troubleshooting. To find out more see: www.2020media.com/joomla

Joomla! User Group London is for anyone of any experience to discuss and promote Joomla! in London. It’s free to attend and meets on the third Tuesday of every month.

Joomla Meetup March

Gary Barclay of  www.turnedontotech.co.uk gave us news of the Joomla user group meeting on 19th March.

We started off with a follow up to the security conversation from February. Joe and Phil from softforge.co.uk had laid a trap for a hacker who’d managed to implant a malicious file on a out of date Joomla site. They modified his file so that they could trace what actions he was taking. The feeling of having control over the hacker, even after the effect, was a very nice indeed!

The next item was a preview of Joomla 3.1 beta. The main topic was Tags. This led onto a discussion about keeping urls the way you want them. After this came  Zoo shopping cart options with YooDocs and Zoolanders.

Finally the floor was opened to general discussion and many Joomla problems were raised and then dispatched with the usual expertise from those present.

 

 

CiviCRM User and Administrator Training

CiviCRM logo
CiviCRM

Oliver Gibson and Michael McAndrew will be providing a  2 day training course in London in March covering the configuration, administration, and every-day use of CiviCRM.

The course is aimed at administrators and users from organisations that are either using CiviCRM or are interested in evaluating it. It is also of use to implementors and developers who need a complete understanding of CiviCRM’s “out of the box” features and configuration options.

As well as covering the specifics of CiviCRM, they will share examples of previous projects and can help with specific problems and use cases.

The cost is £400. For more information and registration see http://civicrm.org/civicrm/event/info?reset=1&id=272

There’s now a regular monthly meetup for CiviCRM users in London. Someone from the 2020Media team usually attends so if you’re going and would like to talk, let us know!

Also in March, NfP Services are hosting a free seminar at their London offices (with refreshments and lunch included). See http://civicrm.org/civicrm/event/info?reset=1&id=193 for details. The event is ideal for anyone who is new to CiviCRM and would like to find out more