{"id":74,"date":"2005-03-26T22:29:16","date_gmt":"2005-03-27T06:29:16","guid":{"rendered":"http:\/\/www.laurenwood.org\/anyway\/archives\/2005\/03\/26\/getting-to-thumbnails\/"},"modified":"2007-02-03T19:18:22","modified_gmt":"2007-02-04T03:18:22","slug":"enabling-thumbnails","status":"publish","type":"post","link":"https:\/\/www.laurenwood.org\/anyway\/2005\/03\/enabling-thumbnails\/","title":{"rendered":"Enabling Thumbnails"},"content":{"rendered":"<p>I decided I finally wanted to track down why I could\u00adn\u2019t get the thumb\u00adnails work\u00ading on Word\u00adPress. I always get the mes\u00adsage \u201cFile type not sup\u00adpor\u00adted. Thumb\u00adnail not cre\u00adated.\u201d even when the file\u00adtype is sup\u00adpor\u00adted. I run a stand\u00adard Debi\u00adan stable sys\u00adtem, with a back\u00adport of MySQL, so my first assump\u00adtion was that it should work. A long week\u00adend is a good chance to try to track down these things, espe\u00adcially when it\u2019s rain\u00ading as much as it is this week\u00adend in Van\u00adcouver. Of course, I start at the Word\u00adPress sup\u00adport for\u00adums. This leads me to try <code>apt-get install libgd2<\/code>; the thumb\u00adnails don\u2019t work. As a next approx\u00adim\u00ada\u00adtion, try <code>apt-get install php4-gd2<\/code>; this also does\u00adn\u2019t&nbsp;work.<\/p>\n<p>I dig a bit deep\u00ader in the for\u00adums and find that a new\u00ader ver\u00adsion of <span class=\"caps\">PHP<\/span> might solve the prob\u00adlem; the <em>Debi\u00adan stable<\/em> ver\u00adsion is 4.1.2 and a ver\u00adsion &gt; 4.3 is recom\u00admen\u00added as the <span class=\"caps\">GD<\/span> lib\u00adrary is included by default. The oth\u00ader advant\u00adage to upgrad\u00ading <span class=\"caps\">PHP4<\/span> is that there are quite a few secur\u00adity holes fixed in ver\u00adsion 4.3.9 and up; these may have been back\u00adpor\u00adted to 4.1.2, of course.  So I look in <em>backports.org<\/em> because I already know how to use those; no new\u00ader ver\u00adsion of php4 there. Next I try <em>dotdeb.org<\/em>; this back\u00adport site has a new\u00ader ver\u00adsion of <span class=\"caps\">PHP4<\/span> and a new\u00ader ver\u00adsion of MySQL. I add the magic line <code>deb http:\/\/packages.dotdeb.org .\/<\/code> to the <code>\/etc\/apt\/sources.list<\/code> file. I also change the pin pri\u00ador\u00adity in the pref\u00ader\u00adences file to use <em>dotdeb.org<\/em> rather than <em>backports.org<\/em>. This upgrades my MySQL to dot\u00adde\u00adb\u2019s 4.0 ver\u00adsion nicely, but does\u00adn\u2019t touch the <span class=\"caps\">PHP4<\/span> install\u00ada\u00adtion. Seems odd to me since they should both be upgraded in the same way, I would have thought. Edd Dum\u00adbill (Debi\u00adan guru) gives me a couple of oth\u00ader things to try in the pref\u00ader\u00adences file; noth\u00ading seems cap\u00adable of rais\u00ading the pri\u00ador\u00adity of the dot\u00addeb php4 install over the cur\u00adrent stable installed ver\u00adsion. Edd sug\u00adgests installing each <code>.deb<\/code> by brute force; that breaks on unmet dependencies.<\/p>\n<p>So I think about installing the <em>unstable<\/em> ver\u00adsion of <span class=\"caps\">PHP4<\/span>; maybe that will work bet\u00adter. I set up the pin pri\u00ador\u00adit\u00adies in the <code>preferences<\/code> file, and use <code>apt-get -t unstable install php4<\/code>. It threatens to install lots of things, so I decide to install a little at a time and make sure noth\u00ading breaks, or at least ensure I know what has broken if it does. First off, I make backups of <code>httpd.conf<\/code>, <code>access.conf<\/code>, the fire\u00adwall script, and the <span class=\"caps\">PPPOE<\/span> set\u00adtings. Just in case. Not that I\u2019m para\u00adnoid or anything.<\/p>\n<ol>\n<li>I install the <em>unstable<\/em> ver\u00adsion of <code>libexpat1<\/code>; this installs <code>libc6<\/code> and talks about hav\u00ading to restart the <span class=\"caps\">X11<\/span> serv\u00ader. Since I\u2019m not run\u00adning X, this isn\u2019t a prob\u00adlem. Then it decides it also needs to restart apache but the restart fails so I have to start apache by hand. For a while it looks like that failed too and I\u2019m men\u00adtally curs\u00ading but it does even\u00adtu\u00adally restart.<\/li>\n<li>Then I decide, rather than the piece\u00admeal approach, to do the full install with <code>apt-get -t unstable install php4<\/code>. As a side-effect it looks like I also get perl updated to 5.8.4, and it upgrades apache (just as well I saved those conf files!). The install script tells me about changes to apache con\u00adfig files, which has me a little wor\u00adried\u2026 I decide to install the pack\u00adage main\u00adtain\u00ader\u00ad\u2019s ver\u00adsion of <code>httpd.conf<\/code> and add in any needed changes later. Everything seems to keep on run\u00adning after\u00adwards, though, so this upgrade was bet\u00adter than the last <code>dist-upgrade<\/code> I did, which did\u00adn\u2019t apply my changes to <code>httpd.conf<\/code>. <\/li>\n<\/ol>\n<p>Now <code>phpinfo.php<\/code> shows that I have php4.3.10 installed on my sys\u00adtem; time to try out the thumb\u00adnail func\u00adtion\u00adal\u00adity. It still does\u00adn\u2019t work. Rein\u00adstall <code>php4-gd2<\/code>. Thumb\u00adnails still don\u2019t work. Try <code>apt-get -t unstable install php4-gd<\/code>, which also seems to uninstall\/reinstall\/install a whole bunch of pack\u00adages. I con\u00adsole myself that I\u2019m half-way to <em>sarge<\/em>, if and when that ver\u00adsion of Debi\u00adan ever makes it to <em>stable<\/em>. Hmm, the install script just asked me what size paper should be the default on my sys\u00adtem. I guess it has some reas\u00adon for want\u00ading to&nbsp;know.<\/p>\n<p>Since the thumb\u00adnail gen\u00ader\u00ada\u00adtion still does\u00adn\u2019t work, and I have no idea what to try next, I decide to give up and post on the Word\u00adPress sup\u00adport for\u00adum. I hope someone there knows what the prob\u00adlem might be! In the mean\u00adtime I cre\u00adate the thumb\u00adnail I need using Imagema\u00adgick\u00ad\u2019s <code>convert<\/code> func\u00adtion. This takes one com\u00admand line and approx\u00adim\u00adately 0.01 seconds.<\/p>\n<p>Later\u2026 on the Word\u00adPress sup\u00adport for\u00adum someone tells me to search the for\u00adums. Since I\u2019d star\u00adted by doing that (and quoted for\u00adum searches in my post), that was\u00adn\u2019t par\u00adtic\u00adu\u00adlarly help\u00adful. Then I remem\u00adber I have SpamKarma installed, which has a captcha script (not that I want to use it, but it should be a good test). The error mes\u00adsage on the captcha test page says the <span class=\"caps\">GD<\/span> lib\u00adrary isn\u2019t enabled. A bit of Googling turns up the idea that maybe I need to restart apache yet again. I had\u00adn\u2019t thought of this before because the Debi\u00adan upgrade\/install pro\u00adcess usu\u00adally restarts everything that needs to be restar\u00adted, includ\u00ading apache. I run <code>apachectl restart<\/code> and find I can finally click the magic but\u00adton on image upload to cre\u00adate thumbnails!<\/p>\n<p>So the les\u00adson appears to be: if in doubt, restart apache. Three times, prefer\u00adably. Any less just may not&nbsp;work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few pit\u00adfalls on the way to enabling the thumb\u00adnail func\u00adtion\u00adal\u00adity in WordPress.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":""},"categories":[6,4],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-technology","category-wp-mechanics"],"_links":{"self":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":0,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}