28-nov-2008

Upload fails
Triggered by a message in the WASD mailing list, I tried what was said to fail: Uploading an image. Well, the upload itself is fine, but linking it to a post fails:

Warning: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /sysblog/wp-includes/compat.php on line 94

Warning: array_slice(): The first argument should be an array in /sysblog/wp-includes/compat.php on line 95

Warning: implode(): Bad arguments. in /sysblog/wp-includes/compat.php on line 96

The file IS uploaded, but linking it ot the post doesn’t work. At least, embedding the image into the post does not work as before. The same error occurs in the Gallery and Media Libary selection panels, so there is no way linking an image directly into the post. Weird, though, that using the Media Library tab under Manage has no porblem at all, showing the images. That shows a permalink to the image itself – and that’s not a problem.

This issue was introduced, it seems, in 2.6.3.

It must be someting that causes a problem either in PHP or in the database. I’ll put a question in the WP forums.

Earlier posts still work without a problem, it’s just the addition into the post that gives trouble. As a workaround, you can always add is manually, like:

<a href='http://(site)/(blogdir)/wp-content/uploads/(yyyy)/(mm)/(image).png' title='(title)'><img src='http://(site)/(blogdir)/wp-content/uploads/(yyyy)/(mm)/(imagefile)' alt='(title)' /></a>.

As an example, similar code was copied from an earlier post and added in here:

Example of manually added image

This should have been done by the PHP code, that fails.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.