Permalink
Browse files

Update site

  • Loading branch information...
1 parent 20251f2 commit ba117efe997d93eedd56ef06653b0330c805f8f3 @davidjb committed May 8, 2013
View
@@ -31,6 +31,8 @@
<h1>Archives for DavidJB.com</h1>
<dl>
+ <dt>Wed 08 May 2013</dt>
+ <dd><a href="http://davidjb.com/blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/">uWSGI and libxml2 conflicts (aka Installing uWSGI with a custom&nbsp;libxml2)</a></dd>
<dt>Mon 22 April 2013</dt>
<dd><a href="http://davidjb.com/blog/2013/04/integrating-nginx-and-a-shibboleth-sp-with-fastcgi/">Integrating Nginx and a Shibboleth <span class="caps">SP</span> with&nbsp;FastCGI</a></dd>
<dt>Mon 22 April 2013</dt>
View
@@ -120,6 +120,34 @@
<li><article class="hentry">
<header>
+ <h1><a href="http://davidjb.com/blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/" rel="bookmark"
+ title="Permalink to uWSGI and libxml2 conflicts (aka Installing uWSGI with a custom libxml2)">uWSGI and libxml2 conflicts (aka Installing uWSGI with a custom&nbsp;libxml2)</a></h1>
+ </header>
+
+ <div class="entry-content">
+ <footer class="post-info">
+ <abbr class="published" title="2013-05-08T00:00:00">
+ Wed 08 May 2013
+ </abbr>
+
+ <address class="vcard author">
+ By <a class="url fn" href="http://davidjb.com/author/davidjb.html">davidjb</a>
+ </address>
+ <p>In <a href="http://davidjb.com/category/web.html">Web</a>. </p>
+<p>tags: <a href="http://davidjb.com/tag/uwsgi.html">uWSGI</a><a href="http://davidjb.com/tag/libxml2.html">libxml2</a><a href="http://davidjb.com/tag/xml-config.html">xml-config</a></p>
+</footer><!-- /.post-info --> <p>If you&#8217;re using uWSGI with <span class="caps">XML</span> support (this is its default), then it will
+be requiring you to have <tt class="docutils literal">libxml2</tt> installed &#8212; or something similar that
+provides <tt class="docutils literal"><span class="pre">xml-config</span></tt>. What you&#8217;ll find is some erratic behaviour (or
+complete failure) when attempting to serve an application that is also
+relying on ...</p>
+ <a class="readmore" href="http://davidjb.com/blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/">read more</a>
+ <p>There are <a href="http://davidjb.com/blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
+ </article></li>
+
+
+
+ <li><article class="hentry">
+ <header>
<h1><a href="http://davidjb.com/blog/2012/08/virtualenv-being-ignored-by-setuptoolsdistributeeasy_install/" rel="bookmark"
title="Permalink to Virtualenv being ignored by setuptools/Distribute/easy_install">Virtualenv being ignored by&nbsp;setuptools/Distribute/easy_install</a></h1>
</header>
@@ -281,33 +309,6 @@
<a class="readmore" href="http://davidjb.com/blog/2011/07/watch-out-python-2-4-zeo-client-and-python-2-6-zeo-server/">read more</a>
<p>There are <a href="http://davidjb.com/blog/2011/07/watch-out-python-2-4-zeo-client-and-python-2-6-zeo-server/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
-
-
-
- <li><article class="hentry">
- <header>
- <h1><a href="http://davidjb.com/blog/2009/06/webpage-content-underneath-flash-content/" rel="bookmark"
- title="Permalink to Webpage content underneath Flash content">Webpage content underneath Flash&nbsp;content</a></h1>
- </header>
-
- <div class="entry-content">
- <footer class="post-info">
- <abbr class="published" title="2009-06-12T13:33:00">
- Fri 12 June 2009
- </abbr>
-
- <address class="vcard author">
- By <a class="url fn" href="http://davidjb.com/author/davidjb.html">davidjb</a>
- </address>
- <p>In <a href="http://davidjb.com/category/web.html">Web</a>. </p>
-<p>tags: <a href="http://davidjb.com/tag/content.html">content</a><a href="http://davidjb.com/tag/flash.html">flash</a><a href="http://davidjb.com/tag/html.html">html</a><a href="http://davidjb.com/tag/problem.html">problem</a><a href="http://davidjb.com/tag/web.html">web</a><a href="http://davidjb.com/tag/xhtml.html">xhtml</a></p>
-</footer><!-- /.post-info --> <p>So, you&#8217;ve got a website that you&#8217;ve made and you&#8217;ve used a Flash movie
-on it.&nbsp; Okay, no worries.&nbsp; Now, what if you tried to add a
-(non-form-element) drop-down menu or some <span class="caps">AJAX</span>-ed content into the site,
-and found the Flash movie actually acted as an ...</p>
- <a class="readmore" href="http://davidjb.com/blog/2009/06/webpage-content-underneath-flash-content/">read more</a>
- <p>There are <a href="http://davidjb.com/blog/2009/06/webpage-content-underneath-flash-content/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
- </article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="http://davidjb.com/author/davidjb11.html">&laquo;</a>
View
@@ -35,6 +35,33 @@
<ol id="posts-list" class="hfeed" start="9">
<li><article class="hentry">
<header>
+ <h1><a href="http://davidjb.com/blog/2009/06/webpage-content-underneath-flash-content/" rel="bookmark"
+ title="Permalink to Webpage content underneath Flash content">Webpage content underneath Flash&nbsp;content</a></h1>
+ </header>
+
+ <div class="entry-content">
+ <footer class="post-info">
+ <abbr class="published" title="2009-06-12T13:33:00">
+ Fri 12 June 2009
+ </abbr>
+
+ <address class="vcard author">
+ By <a class="url fn" href="http://davidjb.com/author/davidjb.html">davidjb</a>
+ </address>
+ <p>In <a href="http://davidjb.com/category/web.html">Web</a>. </p>
+<p>tags: <a href="http://davidjb.com/tag/content.html">content</a><a href="http://davidjb.com/tag/flash.html">flash</a><a href="http://davidjb.com/tag/html.html">html</a><a href="http://davidjb.com/tag/problem.html">problem</a><a href="http://davidjb.com/tag/web.html">web</a><a href="http://davidjb.com/tag/xhtml.html">xhtml</a></p>
+</footer><!-- /.post-info --> <p>So, you&#8217;ve got a website that you&#8217;ve made and you&#8217;ve used a Flash movie
+on it.&nbsp; Okay, no worries.&nbsp; Now, what if you tried to add a
+(non-form-element) drop-down menu or some <span class="caps">AJAX</span>-ed content into the site,
+and found the Flash movie actually acted as an ...</p>
+ <a class="readmore" href="http://davidjb.com/blog/2009/06/webpage-content-underneath-flash-content/">read more</a>
+ <p>There are <a href="http://davidjb.com/blog/2009/06/webpage-content-underneath-flash-content/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
+ </article></li>
+
+
+
+ <li><article class="hentry">
+ <header>
<h1><a href="http://davidjb.com/blog/2010/02/wget-a-plone-site-and-make-it-actually-work/" rel="bookmark"
title="Permalink to Wget a Plone site (and make it actually work)">Wget a Plone site (and make it actually&nbsp;work)</a></h1>
</header>
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>uWSGI and libxml2 conflicts (aka Installing uWSGI with a custom libxml2)</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="http://davidjb.com/theme/css/main.css" type="text/css" />
+ <link href="http://davidjb.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="DavidJB.com Atom Feed" />
+
+ <!--[if IE]>
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
+
+ <!--[if lte IE 7]>
+ <link rel="stylesheet" type="text/css" media="all" href="http://davidjb.com/css/ie.css"/>
+ <script src="http://davidjb.com/js/IE8.js" type="text/javascript"></script><![endif]-->
+
+ <!--[if lt IE 7]>
+ <link rel="stylesheet" type="text/css" media="all" href="http://davidjb.com/css/ie6.css"/><![endif]-->
+
+</head>
+
+<body id="index" class="home">
+ <header id="banner" class="body">
+ <h1><a href="http://davidjb.com/">DavidJB.com <strong>Ramblings about Plone, Pyramid, Python, the web, Linux, roses and more, by David Beitey.</strong></a></h1>
+ <nav><ul>
+ <li><a href="http://davidjb.com/about.html">About&nbsp;me</a></li>
+ <li><a href="http://davidjb.com/blog/index.html">Blog</a></li>
+ <li><a href="http://davidjb.com/projects.html">Projects</a></li>
+ </ul></nav>
+ </header><!-- /#banner -->
+ <section id="content" class="body">
+ <article>
+ <header>
+ <h1 class="entry-title">
+ <a href="http://davidjb.com/blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/" rel="bookmark"
+ title="Permalink to uWSGI and libxml2 conflicts (aka Installing uWSGI with a custom libxml2)">uWSGI and libxml2 conflicts (aka Installing uWSGI with a custom&nbsp;libxml2)</a></h1>
+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="davidjb_">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
+ </header>
+
+ <div class="entry-content">
+ <footer class="post-info">
+ <abbr class="published" title="2013-05-08T00:00:00">
+ Wed 08 May 2013
+ </abbr>
+
+ <address class="vcard author">
+ By <a class="url fn" href="http://davidjb.com/author/davidjb.html">davidjb</a>
+ </address>
+ <p>In <a href="http://davidjb.com/category/web.html">Web</a>. </p>
+<p>tags: <a href="http://davidjb.com/tag/uwsgi.html">uWSGI</a><a href="http://davidjb.com/tag/libxml2.html">libxml2</a><a href="http://davidjb.com/tag/xml-config.html">xml-config</a></p>
+</footer><!-- /.post-info --> <p>If you&#8217;re using uWSGI with <span class="caps">XML</span> support (this is its default), then it will
+be requiring you to have <tt class="docutils literal">libxml2</tt> installed &#8212; or something similar that
+provides <tt class="docutils literal"><span class="pre">xml-config</span></tt>. What you&#8217;ll find is some erratic behaviour (or
+complete failure) when attempting to serve an application that is also
+relying on <tt class="docutils literal">libxml2</tt>, but a different&nbsp;version.</p>
+<p>In my case, my original uWSGI was built with CentOS 5&#8217;s stock <tt class="docutils literal">libxml2</tt>
+library, but my Python application was using <tt class="docutils literal">lxml</tt>, built with a custom
+version of <tt class="docutils literal">libxml2</tt> (via Buildout with the <a class="reference external" href="https://pypi.python.org/pypi/z3c.recipe.staticlxml">z3c.recipe.staticlxml</a> recipe, in case you
+were curious). Because of these two versions being different, some odd
+errors took place when <tt class="docutils literal">lxml</tt> was being imported within my&nbsp;application.</p>
+<p>Unfortunately, I don&#8217;t have the full details of these errors, but suffice
+to say that <tt class="docutils literal">lxml</tt>&#8216;s <span class="caps">XSLT</span> functionality couldn&#8217;t be imported or else
+used successfully without errors like <tt class="docutils literal">lxml.etree.XSLTApplyError</tt>,
+<tt class="docutils literal">undefined symbol: xmlXPathCompiledEvalToBoolean</tt>,&nbsp;or:</p>
+<pre class="literal-block">
+File &quot;xslt.pxi&quot;, line 596, in lxml.etree.XSLT.__call__ (src/lxml/lxml.etree.c:139974)
+lxml.etree.XSLTApplyError: Unregistered function
+</pre>
+<p>The errors were strange, and inconsistent as I tried to switch between
+different versions of <tt class="docutils literal">libxml2</tt>.</p>
+<div class="section" id="installing-uwsgi-with-the-same-libxml2">
+<h2>Installing uWSGI with the same&nbsp;libxml2</h2>
+<p>Good news! It&#8217;s easy to ensure that your uWSGI gets compiled using the same
+<tt class="docutils literal">libxml2</tt>. You just need to ensure that your <tt class="docutils literal"><span class="caps">PATH</span></tt> environment variable
+is configured correctly before installing &#8212; so, you&#8217;ll need to ensure that
+your custom <tt class="docutils literal"><span class="pre">xml-config</span></tt> is found before any&nbsp;others.</p>
+<pre class="code bash literal-block">
+<span class="nb">export </span><span class="nv"><span class="caps">PATH</span></span><span class="o">=</span>/opt/buildout/parts/lxml/libxml2/bin:<span class="nv">$<span class="caps">PATH</span></span>
+<span class="c">#Do your uWSGI install
+</span>pip install uWSGI
+<span class="c">#or
+</span>./bin/buildout
+<span class="c">#etc</span>
+</pre>
+<p>In my case, I&#8217;m using Buildout, so whilst the above path didn&#8217;t initially
+exist, it gets created and installed during the Buildout process.
+Alternatively, it is possible to use something like
+<tt class="docutils literal">collective.recipe.environment</tt> for Buildout to do this environment setting
+for you, in case you are using&nbsp;Buildout.</p>
+<p>I&#8217;m looking into getting the way I&#8217;m installing uWSGI with Buildout,
+<tt class="docutils literal">buildout.recipe.uwsgi</tt>, to accept customisation for a build option like
+this. Stay tuned for&nbsp;more.</p>
+</div>
+
+ </div><!-- /.entry-content -->
+ <div class="comments">
+ <h2>Comments !</h2>
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_identifier = "blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/";
+ var disqus_url = "http://davidjb.com/blog/2013/05/uwsgi-and-libxml2-conflicts-aka-installing-uwsgi-with-a-custom-libxml2/";
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://davidjb.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ </div>
+
+ </article>
+</section>
+ <section id="extras" class="body">
+ <div class="blogroll">
+ <h2>blogroll</h2>
+ <ul>
+ <li><a href="http://planet.plone.org">Planet Plone</a></li>
+ <li><a href="http://jcu.me">jcu.me Research Porfolio</a></li>
+ <li><a href="http://xckd.com">XKCD</a></li>
+ <li><a href="http://appleinsider.com/">Apple Insider</a></li>
+ <li><a href="http://git.io/djb">Latest coding activity</a></li>
+ <li><a href="http://www.ozbargain.com.au">OzBargain</a></li>
+ </ul>
+ </div><!-- /.blogroll -->
+ <div class="social">
+ <h2>social</h2>
+ <ul>
+ <li><a href="http://davidjb.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
+
+ <li><a href="http://git.io/djb">GitHub</a></li>
+ <li><a href="http://twitter.com/davidjb_">Twitter</a></li>
+ <li><a href="http://linkedin.com/in/davidbeitey">LinkedIn</a></li>
+ <li><a href="http://facebook.com/david.beitey">Facebook</a></li>
+ <li><a href="https://plus.google.com/u/0/106527454335411502430">Google+</a></li>
+ </ul>
+ </div><!-- /.social -->
+ </section><!-- /#extras -->
+
+ <footer id="contentinfo" class="body">
+ <address id="about" class="vcard body">
+ Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
+ </address><!-- /#about -->
+
+ <p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
+ </footer><!-- /#contentinfo -->
+
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-24253455-1']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+<script type="text/javascript">
+ var disqus_shortname = 'davidjb';
+ (function () {
+ var s = document.createElement('script'); s.async = true;
+ s.type = 'text/javascript';
+ s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
+ }());
+</script>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit ba117ef

Please sign in to comment.