Title: Image Captions causing Post errors
Last modified: August 19, 2016

---

# Image Captions causing Post errors

 *  [javadevelop](https://wordpress.org/support/users/javadevelop/)
 * (@javadevelop)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/)
 * Since upgrading to 2.6 (and subsequently) to 2.6.1 and 2.6.2, I’m having a problem
   with images and captions.
 * Whenever I add a caption to an image, the saved Post displays an error similar
   to this:
    Warning: Compilation failed: characters with values > 255 are not yet
   supported in classes at offset 16 in /vservers/username/htdocs/wp-includes/shortcodes.
   php on line 213
 * No matter how long or short the caption is, I get this error. I’ve never successfully
   been able to use captions. Any suggestions of what is wrong?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [rekall](https://wordpress.org/support/users/rekall/)
 * (@rekall)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853762)
 * came across the same issue today.
    wordpress 2.6.1 & php 4.3.2 upgrading php 
   to 4.4.9 or php5 is not in our future. help???
 *  Thread Starter [javadevelop](https://wordpress.org/support/users/javadevelop/)
 * (@javadevelop)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853774)
 * Why do you think the version of php matters? My host can switch back and forth
   from php4.x to 5.x. I haven’t tried switching yet, but wondering why php version
   may have something to do with the error.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853775)
 * This error occurs when your host is using a version of PHP with an outdated PCRE
   library.
 * PHP comes with an up-to-date library, but sometimes people use the system libraries
   instead when compiling PHP.
 * Regardless, there’s no other way to fix this. Upgrade PHP. If your host won’t
   do it, switch hosts. If you are the host, and your boss won’t let you do it, 
   switch companies. Seriously, that fix was released back in May 2003. Get with
   the program already.
 * Also PHP 4 support is officially dead. Seriously. They ceased support for it 
   back in February. Upgrade to PHP 5.
 *  Thread Starter [javadevelop](https://wordpress.org/support/users/javadevelop/)
 * (@javadevelop)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853827)
 * Ok, so my host upgraded me to PHP 5.1 today. Now, when I add a caption to an 
   image, I no longer get that error (mentioned in original post), but do have a
   side-effect.
 * 1. The caption does not display in the blog.
    2. The image which I have as left-
   aligned is no longer wrapping text, the text always starts on the line below 
   the image.
 * NOTE: I’m using the “Vista” theme.
 * Do you think the theme is the culprit? Possibly something wrong with the PHP 
   config? Something else?
 *  [Monika](https://wordpress.org/support/users/monika/)
 * (@monika)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853876)
 * Hi Otto42
    I have the same probleme
 *  Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch11 proxy_html/
   2.5 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
 * PCRE Library Version 6.7.7.4 2008-07-04
 * so please can you tell me what is wrong ..
 * if I’m using caption in a static page- I see nothing ..
    the page title and no
   pixel more.:(
 * no php errors..
 * WP 2.6.2 and no update a new clean installation
 * thanks a lot
 * Monika
 *  Thread Starter [javadevelop](https://wordpress.org/support/users/javadevelop/)
 * (@javadevelop)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853894)
 * ..bump..
 * Hoping to have Otto42 or other expert weigh in on what Monica and I are doing
   wrong. Appreciate any additional advice on this.
 * Thanks.
 *  Thread Starter [javadevelop](https://wordpress.org/support/users/javadevelop/)
 * (@javadevelop)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853908)
 * Still no responses from the experts? Can someone help Monika and I on this Image
   Caption issue please?
 *  [joetan](https://wordpress.org/support/users/joetan/)
 * (@joetan)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853934)
 * totally not recommended, but if you can’t upgrade PHP at all, try this, which
   is what I did:
 * open up shortcodes.php, and delete line 214 ($text = preg_replace….)
 * and then remove all instances of “stripcslashes” from line 211 to 232 (inside
   the function shortcode_parse_att)
 * This will disable some sanity error checks WP performs.
 *  [remob](https://wordpress.org/support/users/remob/)
 * (@remob)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853963)
 * Or change line 213 in /wp-includes/shortcodes.php to
 * `$text = preg_replace("/[\x{00a0}\x{ff}]+/u", " ", $text);`
 * This maintains the functionality but only includes the supported characters. 
   I have this running on two blogs and it doesn’t seem to have caused a problem
   yet…

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Image Captions causing Post errors’ is closed to new replies.

## Tags

 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [compilation failed](https://wordpress.org/support/topic-tag/compilation-failed/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 6 participants
 * Last reply from: [remob](https://wordpress.org/support/users/remob/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/image-captions-causing-post-errors/#post-853963)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
