Posts Tagged ‘install’

Wordpress thumbnail generation disabled

Tuesday, June 23rd, 2009

No thumbnails in your wordpress? Read on…

I noticed last night that my wordpress is not generating thumbnails from uploaded images like it’s suppose to. You’ll noticed that the size options (thumbnail, medium, large) are all disabled except for the full size.

wordpress-size-options

After doing a lot of searching, I finally found out that in order for wordpress to generate thumbnails “by default”, you need to have GD library support for your php. It would have been nice if wordpress had documented that better.

The only reference I found was this:

http://wordpress.org/support/topic/235625

To be clear, wordpress does not generate thumbnails by default unless your php instance has GD support.

Install php gd library

For me, installing GD library was easy:

# yum install php-gd

Check for gd

To check if you have GD loaded in php:

# php -m
[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
exif
ftp
gd
gettext
gmp
hash
iconv

this version of PCRE is not compiled with PCRE_UTF8 support

Monday, June 22nd, 2009

After installing wordpress, I got a lot of these errors in my apache wordpress error log.

PHP Warning:  preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]:
Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in ...

I am running apache 2.2.8 and it uses the built-in version 5 of pcre.

http://httpd.apache.org/docs/2.2/new_features_2_2.html

The problem is that version 5 of pcre does not contain UTF-8 support.  So I had to recompile apache with a newer version of pcre. Luckily I have pcre 6.6 already installed on my linux box.

>> rpm -qa |grep -i pcre
pcre-devel-6.6-2.el5_0.1
pcre-6.6-2.el5_0.1
pcre-6.6-2.el5_0.1

So all I had to do is re-compile apache with the “–with-pcre” flag.

./configure --with-pcre

If you don’t know what version of pcre your php is using, create a phpinfo script and hit it with your broswer.  You should see…

pcre version

Happy compiling…