Reggie Thomson’s Diary

Diary of a Digital Photographer

January 24th, 2007

Modifying the wp_options table to run on localhost

There are two lines to edit in the wp_options table to edit when importing data from the live server to the local test computer.

option_name = “siteurl” -> remove the (www.)domainname(.net) leaving just domainname

option_name = “home” -> remove the (www.)domainname(.net) leaving just domainname

January 24th, 2007

curl_init() in MyTube plug-in on Windows Apache/PHP

The next error in the upgrade from WordPress 2.0.7 to 2.1 is:

Fatal error: Call to undefined function curl_init() in E:\…..\wordpress\wp-content\plugins\mytube\ytube.php on line 216

I am using the MyTube plug-in to insert YouTube videos on my blogs.

The PHP manual for CURL states:

Note to Win32 Users: In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH.

On my Apache 2.0.54 / PHP 5.2.0 / MySQL 4.1.22 windows XP system, that meant copying the two files from “\Program Files\PHP5\” to “\Program Files\Apache Group\Apache2\modules\php\”

This did not work. I then tried to move them into “\Program Files\Apache Group\Apache2\bin\” but they were already there!

From the phpinfo file (which I permit only to a logged-in administrator user on my webserver because it leaks the MySQL passwords), I noted that the php.ini file still had the line:

include_path = “c:\program files\php4;c:\program files\jhead”

when the new version of PHP was in the directory “c:\program files\php5″.

Rectifying this also failed to remove the problem.

I tried stopping and restarting Apache, with no success.

I notice my online phpinfo() reveals that

curl

CURL support enabled
CURL Information libcurl/7.13.1 OpenSSL/0.9.7f zlib/1.2.2.2 libidn/0.5.15

The solution was to enable the module in php.ini by uncommenting the line:

extension=php_curl.dll

and then restarting Apache.

This is not really an upgrade problem - I guess I only noticed it when I uploaded the recent data from online to the offline site, and then upgraded WordPress.

January 23rd, 2007

Upgrading to WordPress 2.1 - WP_CACHE error

I’m in the initial test stages of upgrading to WordPress 2.1 from 2.0.7.

I don’t remove the old files from the directories, since there is some stuff in tinymce and other places which has been added by the plug-ins. So, I’ve just unzipped the downloaded 2.1 file over the top of all existing files.

The first error was a Fatal error on line 84 of wp-settings.php

PHP Warning: require(E:\…..\wordpress/wp-content/advanced-cache.php) [function.require]: failed to open stream: No such file or directory in E:\……\wordpress\wp-settings.php on line 84
PHP Fatal error: require() [function.require]: Failed opening required ‘E:\…..\wordpress/wp-content/advanced-cache.php’ (include_path=’c:\program files\php4;c:\program files\jhead’) in E:\…..\wordpress\wp-settings.php on line 84


// For an advanced caching plugin to use, static because you would only want one
if ( defined('WP_CACHE') )
	require (ABSPATH . 'wp-content/advanced-cache.php');

Since I’m not using the wp-cache module, I commented out the line in wp-config:


// define('WP_CACHE', true);
January 18th, 2007

Too many spams slipping through Akismet - added Bad Behaviour

I’ve had a few spam comments slipping through the Akismet filters, so I’ve decided to add Bad Behaviour. I’ll need to tidy up the footer, though. To be honest, I don’t have many comments on my blogs, so I could probably disable them completely.

January 16th, 2007

Just updated again to WordPress-2.0.7

It seems to have gone smoothly, and I didn’t bother to deactivate all my plug-ins. This saved a lot of time!

January 15th, 2007

Upgrading to WordPress2.0.6 - Gengo error - blank page for French

I’ve upgraded my WordPress test website to WordPress2.0.6.

Now, the French language page is blank.

I enable PHP errors to be visible by updating the .htaccess to include:

php_flag  display_errors  on

The error is reported as

Fatal error: Class ‘CachedFileReader’ not found in /…./wp-includes/wp-l10n.php on line 67

A local search of the contents of all the files on the wordpress directory gave this clue in wp-content/plugins/gengo/readme.txt

= I get “Fatal error: cannot instantiate non-existant class cachedfilereader” =

You have to set WPLANG in your wp-config.php file to be the default language locale.

I edit config.php to put the default language to English


// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', 'en');

And everything works (even though there is no corresponding en.MO file in the wp-includes/languages directory).

January 15th, 2007

Wordpress 2.0.6 updated - Audioplayer plug-in stuck on “buffering”

I’ve just updated to Wordpress 2.0.6.

There didn’t seem to be any upgrades to the database this time.

I notice that Audioplayer seems not to work properly - it gets stuck in the “buffering” stage and doesn’t start playing.

[audio:test.mp3]

I shall post this and test in MSIE.

Resolved: There was an incorrect setting in the Audio player options.

The correct setting, under “Options” -> “Audio Player” -> “Audio files directory” should be “/wp-content/uploads/audio”.

Note: I use this so that I can upload audio files using the Organiser plug-in.

|