<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private Cave &#187; module</title> <atom:link href="https://bogdan.org.ua/tags/module/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>drush pm-update fails: tar hangs when extracting *.tar.gz module archives from drupal.org</title><link>https://bogdan.org.ua/2014/08/25/drush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html</link> <comments>https://bogdan.org.ua/2014/08/25/drush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html#comments</comments> <pubDate>Mon, 25 Aug 2014 14:53:10 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[archive]]></category> <category><![CDATA[drupal]]></category> <category><![CDATA[extract]]></category> <category><![CDATA[hangs]]></category> <category><![CDATA[module]]></category> <category><![CDATA[strace]]></category> <category><![CDATA[tar]]></category> <category><![CDATA[trace]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2164</guid> <description><![CDATA[Drush is awesome, especially for updating multisite Drupal installations. I had only started using it a few days ago, and I&#8217;ve immediately hit a problem, to which I did find a workaround. Symptoms running drush @sites pm-update results in normal execution up to after answering &#8216;y[es]&#8216;; then drush seems to hang indefinitely (haven&#8217;t waited beyond [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://drush.ws/">Drush</a> is awesome, especially for <a
href="http://bogdan.org.ua/2014/08/25/how-to-update-a-multisite-drupal-6-7-installation-using-drush.html">updating multisite Drupal installations</a>.<br
/> I had only started using it a few days ago, and I&#8217;ve immediately hit a problem, to which I did find a workaround.</p><p><strong>Symptoms</strong></p><ul><li>running <code>drush @sites pm-update</code> results in normal execution up to after answering &#8216;y[es]&#8216;; then drush seems to hang indefinitely (haven&#8217;t waited beyond about 10 minutes, maybe it does produce an error after a long while);</li><li>running the same command with <code>--debug</code> shows that drush hangs when trying to untar the downloaded module.tar.gz archive; there are no errors/warnings, it just hangs with no CPU usage;</li><li>trying to untar any of the modules downloaded from drupal.org manually is also unsuccessful: <code>tar -xzvf module.tar.gz</code> seems to do nothing, it also hangs with zero CPU usage/time and no warnings/errors;</li><li>interestingly, if I create some <code>test.tar.gz</code> locally, <code>tar</code> does happily extract that;</li><li>finally, running <code>strace tar -xzvf module.tar.gz</code> shows a number of unexpected lines, such as references to NSS and libnss files (I am only showing some of the lines of strace output, including the last line):<br
/><blockquote><p>open(&#8220;/etc/nsswitch.conf&#8221;, O_RDONLY)    = 4<br
/> read(4, &#8220;# /etc/nsswitch.conf\n#\n# Example&#8221;&#8230;, 4096) = 683<br
/> open(&#8220;/lib/x86_64-linux-gnu/libnss_nis.so.2&#8243;, O_RDONLY) = 4<br
/> open(&#8220;/lib/x86_64-linux-gnu/libnss_files.so.2&#8243;, O_RDONLY) = 4<br
/> open(&#8220;/etc/passwd&#8221;, O_RDONLY|O_CLOEXEC) = 4<br
/> open(&#8220;/usr/lib/x86_64-linux-gnu/libnss_mysql.so.2&#8243;, O_RDONLY) = 4<br
/> open(&#8220;/etc/group&#8221;, O_RDONLY|O_CLOEXEC)  = 4<br
/> open(&#8220;/etc/libnss-mysql.cfg&#8221;, O_RDONLY) = -1 EACCES (Permission denied)<br
/> open(&#8220;/etc/libnss-mysql-root.cfg&#8221;, O_RDONLY) = -1 EACCES (Permission denied)<br
/> futex(0x7fd0816e8c48, FUTEX_WAIT_PRIVATE, 2, NULL</p></blockquote></li></ul><p><span
id="more-2164"></span></p><p><strong>Analysis</strong><br
/> <code>strace</code> output provided enough information to understand the issue and generate a workaround. Briefly, we see tar querying users and groups information. On the system where this problem was identified, MySQL is used as a name-service back-end. This is why we see references to mysql libraries in the trace. Apparently, <code>tar</code> is trying to resolve some user/groups information, but for some reason does not get what it is asking in a timely manner, or possibly never gets it and will only fail/proceed when the request times out.</p><p><strong>Workaround</strong><br
/> <em>Not a solution</em>, but works: <code>tar -xzv --numeric-owner -f module.tar.gz</code>. The <code>--numeric-owner</code> switch asks <code>tar</code> to use numeric file/directory owner information as-is, without trying to resolve the name of the owner. This works. I have not checked <code>strace</code> for the workaround, but I expect to see no MySQL/NSS references in it with the switch.</p><p>To actually be able to use drush with this workaround, I had to edit <code>drush.inc</code> somewhere under <code>/usr/share/drush/</code>; look for &#8216;tar &#8216; string, and add <code>--numeric-owner</code> where necessary. Do not forget that <code>-f</code> has to be just in front of the archive filename, otherwise your edits will not work.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fdrush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html&amp;linkname=drush%20pm-update%20fails%3A%20tar%20hangs%20when%20extracting%20%2A.tar.gz%20module%20archives%20from%20drupal.org" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fdrush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html&amp;linkname=drush%20pm-update%20fails%3A%20tar%20hangs%20when%20extracting%20%2A.tar.gz%20module%20archives%20from%20drupal.org" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fdrush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html&amp;linkname=drush%20pm-update%20fails%3A%20tar%20hangs%20when%20extracting%20%2A.tar.gz%20module%20archives%20from%20drupal.org" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fdrush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html&amp;linkname=drush%20pm-update%20fails%3A%20tar%20hangs%20when%20extracting%20%2A.tar.gz%20module%20archives%20from%20drupal.org" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fdrush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html&amp;linkname=drush%20pm-update%20fails%3A%20tar%20hangs%20when%20extracting%20%2A.tar.gz%20module%20archives%20from%20drupal.org" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2014%2F08%2F25%2Fdrush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html&#038;title=drush%20pm-update%20fails%3A%20tar%20hangs%20when%20extracting%20%2A.tar.gz%20module%20archives%20from%20drupal.org" data-a2a-url="https://bogdan.org.ua/2014/08/25/drush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html" data-a2a-title="drush pm-update fails: tar hangs when extracting *.tar.gz module archives from drupal.org"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2014/08/25/drush-pm-update-fails-tar-hangs-when-extracting-tar-gz-module-archives-from-drupal-org.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Fresh install of Debian Etch 4.0r1 hangs/freezes dead after boot: solution</title><link>https://bogdan.org.ua/2007/10/24/fresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html</link> <comments>https://bogdan.org.ua/2007/10/24/fresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html#comments</comments> <pubDate>Wed, 24 Oct 2007 12:38:02 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[install]]></category> <category><![CDATA[laptop]]></category> <category><![CDATA[module]]></category> <category><![CDATA[problem]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/2007/10/24/fresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html</guid> <description><![CDATA[Recently, I installed Debian Etch 4.0r1 onto my laptop. However, after the first boot into plain console, computer was dead-frozen after some console usage. I rebooted using the Power button &#8211; this time to gdm; and again, after some keyboard input system was hanging dead. I found the reason at debianhelp.org forums. Basically, it&#8217;s the [&#8230;]]]></description> <content:encoded><![CDATA[<p>Recently, I installed Debian Etch 4.0r1 onto my laptop. However, after the first boot into plain console, computer was dead-frozen after some console usage. I rebooted using the Power button &#8211; this time to gdm; and again, after some keyboard input system was hanging dead.</p><p>I found the reason at debianhelp.org forums. Basically, it&#8217;s the PC speaker module (pcspr) not functioning correctly. I suspect this problem manifests itself only on some types of laptops. The solution is either to somehow reconfigure the pcspkr module, or just disable it. More on how to disable the module below.<br
/> <span
id="more-240"></span><br
/> First of all, boot into console-only mode or even single-user mode. On my install GRUB loader, configured by the Debian Installer, had an option in the boot menu to boot into single-user mode.</p><p>Remember, that any sound emission attempt will freeze your computer in this scenario. So avoid any actions, which might generate a system beep. These actions include (but are in no way limited to): using TAB filename/command autocompletion, using up/down arrows in command line when there is nothing in the history above or below the current command, etc.</p><p>After successfully booting, remove the pcspkr module: <strong>modprobe -r pcspkr</strong> (if that doesn&#8217;t work, try <strong>rmmod pcspkr</strong>). Note, that this command only removes pcspkr module for the current session, and the module will be loaded again on next boot.</p><p>To permanently disable the pcspkr module, you can blacklist it. To do so, add the line <strong>blacklist pcspkr</strong> to the <strong>/etc/modprobe.d/blacklist.local</strong> file. If this file does not exist, you can create it.</p><p>On my system I already had <strong>/etc/modprobe.d/blacklist</strong> file, so I also added <strong>blacklist pcspkr</strong> line to that file. I did not check which one actually worked for me, but on the next boot pcspkr didn&#8217;t load.</p><p>I also did one more thing &#8211; configured console not to beep. This is done in <strong>/etc/inputrc</strong> file by uncommenting the following line: <strong>set bell-style visible</strong> (or you can uncomment <strong>set bell-style none</strong> to have absolutely no bell notifications).</p><p>There&#8217;s also a <a
href="http://www.ducea.com/2006/06/01/disable-ipv6-module-on-default-kernels/">method to disable IPv6 module</a>, which can be adopted for the pcspkr module. However, I didn&#8217;t use it &#8211; methods listed above helped me.</p><p>References other than already cited: <a
href="http://www.thinkwiki.org/wiki/How_to_disable_the_pc_speaker_(beep!)">how to disable PC speaker</a>, <a
href="http://ramblingfoo.blogspot.com/2007/01/how-to-disable-pcspkr-in-etch.html">how to disable PC speaker in Etch</a>.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F24%2Ffresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html&amp;linkname=Fresh%20install%20of%20Debian%20Etch%204.0r1%20hangs%2Ffreezes%20dead%20after%20boot%3A%20solution" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F24%2Ffresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html&amp;linkname=Fresh%20install%20of%20Debian%20Etch%204.0r1%20hangs%2Ffreezes%20dead%20after%20boot%3A%20solution" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F24%2Ffresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html&amp;linkname=Fresh%20install%20of%20Debian%20Etch%204.0r1%20hangs%2Ffreezes%20dead%20after%20boot%3A%20solution" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F24%2Ffresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html&amp;linkname=Fresh%20install%20of%20Debian%20Etch%204.0r1%20hangs%2Ffreezes%20dead%20after%20boot%3A%20solution" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F24%2Ffresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html&amp;linkname=Fresh%20install%20of%20Debian%20Etch%204.0r1%20hangs%2Ffreezes%20dead%20after%20boot%3A%20solution" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F24%2Ffresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html&#038;title=Fresh%20install%20of%20Debian%20Etch%204.0r1%20hangs%2Ffreezes%20dead%20after%20boot%3A%20solution" data-a2a-url="https://bogdan.org.ua/2007/10/24/fresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html" data-a2a-title="Fresh install of Debian Etch 4.0r1 hangs/freezes dead after boot: solution"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2007/10/24/fresh-install-of-debian-etch-40r1-hangsfreezes-dead-after-boot-solution.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Gallery2 AdSense: no module?</title><link>https://bogdan.org.ua/2006/10/01/gallery2-adsense-no-module-how-to-insert.html</link> <comments>https://bogdan.org.ua/2006/10/01/gallery2-adsense-no-module-how-to-insert.html#comments</comments> <pubDate>Sun, 01 Oct 2006 14:35:49 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[CMS]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[AdSense]]></category> <category><![CDATA[gallery2]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[module]]></category> <guid
isPermaLink="false">http://www.bogdan.org.ua/2006/10/01/gallery2-adsense-no-module.html</guid> <description><![CDATA[If you ever need to add AdSense units to your Gallery2 installation, and find no module for this &#8211; try following the text below. I compiled it from several sources (primary menalto.com Gallery2 forum), and did everything written here myself here. Primary source of information was this post, but I recommend that you follow instructions [&#8230;]]]></description> <content:encoded><![CDATA[<p>If you ever need to add AdSense units to your Gallery2 installation, and find no module for this &#8211; try following the text below. I compiled it from several sources (primary menalto.com Gallery2 forum), and did everything written here myself <a
href="http://gallery.bogdan.org.ua/main.php">here</a>.</p><p>Primary source of information was this <a
href="http://galleryproject.org/node/51408" class="broken_link" rel="nofollow">post</a>, but I recommend that you follow instructions here.</p><p>To add AdSense to your Gallery2 sidebar (when using the Matrix theme as a sample):<span
id="more-39"></span></p><ol><li>copy themes/matrix/templates/sidebar.tpl to theme/matrix/templates/local/sidebar.tpl on your server. This is needed to preserve your modifications when the Matrix theme will be upgraded.</li><li>any further modifications should be done in your newly copied local/sidebar.tpl file.</li><li>create the file which will contain all your AdSense code &#8211; e.g., let it be adsense_160x600.tpl for the Wide Scyscraper format. Put all your AdSense code into that file, and upload the file to your theme/matrix/templates/local/ folder on the server.</li><li>now edit the sidebar.tpl file. My original file looked like this:[smarty]<div
id="gsSidebar" class="gcBorder1"> {* Show the sidebar blocks chosen for this theme *}<br
/> {foreach from=$theme.params.sidebarBlocks item=block}<br
/> {g->block type=$block.0 params=$block.1 class=&#8221;gbBlock&#8221;}<br
/> {/foreach}<br
/> {g->block type=&#8221;core.NavigationLinks&#8221; class=&#8221;gbBlock&#8221;}</div><p>[/smarty] I added [smarty]{if $user.isGuest == 1}<br
/> {* adsense code *}<br
/> {g->theme include=&#8221;adsense_160x600.tpl&#8221; class=&#8221;gbBlock&#8221;}<br
/> {/if}[/smarty] and final file looked like this:[smarty]{*<br
/> * $Revision: 1.2 $<br
/> * If you want to customize this file, do not edit it directly since future upgrades<br
/> * may overwrite it.  Instead, copy it into a new directory called &#8220;local&#8221; and edit that<br
/> * version.  Gallery will look for that file first and use it if it exists.<br
/> *}</p><div
id="gsSidebar" class="gcBorder1"> {* Show the sidebar blocks chosen for this theme *}<br
/> {foreach from=$theme.params.sidebarBlocks item=block}<br
/> {g->block type=$block.0 params=$block.1 class=&#8221;gbBlock&#8221;}<br
/> {/foreach}<br
/> {g->block type=&#8221;core.NavigationLinks&#8221; class=&#8221;gbBlock&#8221;}<br
/> {if $user.isGuest == 1}<br
/> {* adsense code *}<br
/> {g->theme include=&#8221;adsense_160x600.tpl&#8221; class=&#8221;gbBlock&#8221;}<br
/> {/if}</div><p>[/smarty]</li><li>well, basically you are done. If you need/want to, you can wrap the inserted code into some styled container, to define the look of the block, like:[smarty]<div
id="adBar" class="gcBorder1">{if $user.isGuest == 1}<br
/> {* adsense code *}<br
/> {g->theme include=&#8221;adsense_160x600.tpl&#8221; class=&#8221;gbBlock&#8221;}<br
/> {/if}</div><p>[/smarty]</li><li>you can use any AdSense format you like, but you must mind the width of the sidebar in your theme &#8211; so that site layout is not broken by too wide AdSense units.</li></ol><p>Finally, some more hints and explanations.</p><p>The smarty variables for users in Gallery2 are:</p><ul><li>$user.isGuest</li><li>$user.isRegisteredUser</li><li>$user.isAdmin</li></ul><p>As you might have noticed, in the code above AdSense unit is shown ONLY IF the page visitor is a Guest. Thus ads will not be shown to Registered Users and Admin. I did not manage to find this condition in Google&#8217;s AdSense Policy, but the source post author states that showing Google Ads in password-protected areas is a violation of Google&#8217;s Terms Of Service (TOS). Again &#8211; I did not find that, but in good faith I provide the code which limits ads to guest-only users. If you want to show ads to any user class &#8211; just remove the first {if} and last {/if} lines from the code. Any knowledgeable comments on this (preferrably with URLs) are very welcome, as personally I see nothing bad in putting AdSense onto password-protected pages in the case of the Gallery, where photos are the main type of content.</p><p>To add multiple ad units &#8211; create a single file for each distinct ad format/type you want to use, and include it using the code shown above. Just keep in mind limitations imposed by Google on the number of ad units of different types on a single page.</p><p>Hope this helps, and good luck to you.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F10%2F01%2Fgallery2-adsense-no-module-how-to-insert.html&amp;linkname=Gallery2%20AdSense%3A%20no%20module%3F" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F10%2F01%2Fgallery2-adsense-no-module-how-to-insert.html&amp;linkname=Gallery2%20AdSense%3A%20no%20module%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F10%2F01%2Fgallery2-adsense-no-module-how-to-insert.html&amp;linkname=Gallery2%20AdSense%3A%20no%20module%3F" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F10%2F01%2Fgallery2-adsense-no-module-how-to-insert.html&amp;linkname=Gallery2%20AdSense%3A%20no%20module%3F" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F10%2F01%2Fgallery2-adsense-no-module-how-to-insert.html&amp;linkname=Gallery2%20AdSense%3A%20no%20module%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2006%2F10%2F01%2Fgallery2-adsense-no-module-how-to-insert.html&#038;title=Gallery2%20AdSense%3A%20no%20module%3F" data-a2a-url="https://bogdan.org.ua/2006/10/01/gallery2-adsense-no-module-how-to-insert.html" data-a2a-title="Gallery2 AdSense: no module?"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2006/10/01/gallery2-adsense-no-module-how-to-insert.html/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)</title><link>https://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html</link> <comments>https://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html#comments</comments> <pubDate>Fri, 08 Sep 2006 15:29:56 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[CMS]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[conversion]]></category> <category><![CDATA[drupal]]></category> <category><![CDATA[import]]></category> <category><![CDATA[migration]]></category> <category><![CDATA[module]]></category> <category><![CDATA[php-nuke]]></category> <category><![CDATA[phpnuke]]></category> <category><![CDATA[utf8]]></category> <guid
isPermaLink="false">http://www.bogdan.org.ua/2006/09/08/php-nuke-60-to-drupal-473-migration-conversion.html</guid> <description><![CDATA[Post last updated: April 18, 2010. Now there is a Drupal 6.x module available. It is in no way related to the migrate script(s) below. The newest script version migrates from PHP-Nuke 6.5 to Drupal 5.x. Download the latest version of the migration script. In 2002 I set up a PHPNuke-6.0 &#8211; based portal. Eventually [&#8230;]]]></description> <content:encoded><![CDATA[<p><em>Post last updated: April 18, 2010.</em></p><p><ins
datetime="2010-04-18T17:54:34+00:00">Now</ins> there is a <a
href="https://drupal.org/project/phpnuke2drupal" class="broken_link" rel="nofollow">Drupal 6.x module available</a>. It is in no way related to the migrate script(s) below.</p><p><ins
datetime="2008-02-19T03:34:21+00:00" title="Note: other version combinations might work as well with no or little modifications. It is known (via bxtra.net) that the script also works for PHPNuke 7.8 to Drupal 5.7 migration - though it isn't known if any modifications were necessary.">The newest script version migrates from PHP-Nuke 6.5 to Drupal 5.x</ins>.<br
/> <a
href="#latest">Download the latest version of the migration script</a>.</p><p>In 2002 I set up a PHPNuke-6.0 &#8211; based portal. Eventually it died due to the lack of time investments and support from collaborators. Now, when time came to revive the project, I made a search and decided to use Drupal as a base CMS for the portal.<br
/> In order to migrate userbase from an old portal to the new Drupal-powered one, and following the <a
href="https://drupal.org/node/498" title="Migrating from PHPNuke" class="broken_link" rel="nofollow">topic</a> at drupal.org, I found a <a
href="http://quillem.com/nuke2drupal" title="original nuke_7.0 to drupal_4.6 script">script</a> and its modification.<br
/> I used it to migrate only users, and made some cosmetic changes:</p><ul><li>added options for custom phpnuke table prefixes</li><li>default user name is now = uname (login), not &#8216;temp_name&#8217;, as before</li><li>I replaced hard-coded links to &#8216;migrate.php&#8217; with links to $_SERVER['PHP_SELF'], so that if you rename the script you don&#8217;t have any problems with that <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></li><li>now forum topics should not be promoted to the main page (changed 1 to 0 as hinted by Alexis)</li></ul><p>Finally, I would like to thank both <a
href="http://quillem.com/">Karthik Kumar</a> for the original script and Alexis Bellido for the 6.0_to_4.7 modification.<br
/> <span
id="more-24"></span></p><p><ins
datetime="2007-02-25T08:46:18+00:00">Update:</ins> Waldo updated the migration script.<br
/> Here are the changes:</p><ul><li>imports from (a security-patched) Nuke 6.5 -> Drupal 5.1</li><li>imports story categories into Drupal taxonomy</li><li>incorporates phpnuke &#8220;Contributor writes&#8230;&#8221; into story</li><li>incorporates phpnuke admin story &#8220;note&#8221;</li><li>imports polls (does not import record of who already voted.  You can easily &#8220;close&#8221; old phpnuke polls via Admin page.  I left them open.)</li><li>imports poll comments</li><li>imports *anonymous* comments for stories, fora, &#038; polls</li><li>imports anonymous forum posts</li><li>filters BBCode to make semi-compatible with Drupal BBCode module</li><li>uses Drupal 5.0 API, and must be run from drupal root directory (/drupal-5/, for example)</li></ul><p>Thanks to Waldo for his work!</p><p><ins
datetime="2007-08-19T15:55:21+00:00"><strong>Latest update:</strong></ins> Waldo sent the newest, improved version of the PHP-Nuke-2-Drupal conversion script. Here is Waldo&#8217;s description:</p><blockquote><p> New Fixes:</p><ul><li>retain original user registration date &#038; last visit   4/22/07</li><li>fixed user migration bug which could result in screwed max_uid in session table   4/22/07</li><li>store anonymous forum posts names in the log for future compatibility w/Drupal 6   7/16/07</li><li>uses the &#8220;tidy&#8221; extension (if installed) in php 5.x to clean up the HTML of postings &#038; stories  7/30/07</li><li>bug fixes (possibly) related to drupal 5.2 where the fora had the wrong &#8220;changed&#8221; date resulting in misordered node lists. 7/30/07</li><li>polls properly remember date of last comment 7/30/07</li></ul><p>If you have the &#8220;tidy&#8221; PHP extension, it should close all open HTML tags and stuff in stories.</p></blockquote><p><ins
datetime="2008-02-19T15:23:55+00:00">update:</ins> I added to the script some more debug messages in case something goes wrong (as <a
href="http://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html#comment-39615">recommended by me</a>) &#8211; that pushed the version up to 0.03.</p><p>Also, now MySQL connection collation is set to utf8 before doing anything &#8211; this <em>should</em> fix the problems with non-English characters in the imported texts (especially accented/umlauted/etc characters). Thus I upped the version to 0.04. For reference and in case 0.04 doesn&#8217;t work for you, I keep the older versions as well.</p><p><a
name="latest"> </a><br
/> Download the <a
href="http://bogdan.org.ua/wp-content/uploads/2008/02/phpnuke2drupal-5.x-0.04-w.zip" title="PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)">latest phpnuke2drupal-5.x-0.04-W.zip</a> or the <a
href="http://bogdan.org.ua/wp-content/uploads/2008/02/phpnuke2drupal-5.x-0.04-w.tar.gz" title="PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)">latest tar-gzipped version of the phpnuke2drupal migration script</a>.</p><p><ins
datetime="2010-01-03T21:35:38+00:00">update:</ins> to import Reviews and WebLinks from PHPNuke to Drupal, have a look at <a
href="https://drupal.org/node/202528#comment-724422" class="broken_link" rel="nofollow">this</a> and <a
href="https://drupal.org/node/202528#comment-689245" class="broken_link" rel="nofollow">this</a> comments; you will need CCK, and might need CCK Link Field to import reviews/weblinks.</p><p><u>Previous (older) versions</u>:<br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2008/01/phpnuke2drupal-5.x-0.03-W.zip">phpnuke2drupal-5.x-0.03-W.zip</a><br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2008/01/phpnuke2drupal-5.x-0.03-W.tar.gz">phpnuke2drupal-5.x-0.03-W.tar.gz</a><br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2007/08/phpnuke2drupal-5.x-0.02-w.zip">phpnuke2drupal-5.x-0.02-w.zip</a><br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2007/08/phpnuke2drupal-5.x-0.02-w.tar.gz">phpnuke2drupal-5.x-0.02-w.tar.gz</a><br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2007/02/phpnuke2drupal-5.x-0.01-W.rar">phpnuke2drupal-5.x-0.01 (VValdo&#8217;s huge improvements first appear here)</a><br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2006/09/migrate_phpnuke_60_to_drupal_47.txt" title="download">first version with my minor modifications</a></p><p><strong>IMPORTANT:</strong> for migration to work you will need MySQL version to be >= 4.1.1. Earlier versions do not support the STR_TO_DATE() function, used in the migration script.</p><p><strong>IMPORTANT:</strong> if you want to migrate forum entries from PHPNuke to Drupal, be sure to setup forum in your Drupal installation first &#8211; otherwise migration of forum entries will fail. See comments 13-17 below for user experiences.</p><p>If you do not get any help here, there is also a drupal.org <a
href="https://drupal.org/node/498" title="Migrating from PHPNuke" class="broken_link" rel="nofollow">migration thread</a>. I will keep this page updated for as long as I get new information about the migration script.</p><p>If you encounter any problems during migration &#8211; just search/scan the comments, your problem might have been already solved by someone else.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F08%2Fphp-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html&amp;linkname=PHP-Nuke%206.0%2F6.5%20to%20Drupal%204.7.x%2F5.x%20migration%20%28conversion%29" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F08%2Fphp-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html&amp;linkname=PHP-Nuke%206.0%2F6.5%20to%20Drupal%204.7.x%2F5.x%20migration%20%28conversion%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F08%2Fphp-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html&amp;linkname=PHP-Nuke%206.0%2F6.5%20to%20Drupal%204.7.x%2F5.x%20migration%20%28conversion%29" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F08%2Fphp-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html&amp;linkname=PHP-Nuke%206.0%2F6.5%20to%20Drupal%204.7.x%2F5.x%20migration%20%28conversion%29" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F08%2Fphp-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html&amp;linkname=PHP-Nuke%206.0%2F6.5%20to%20Drupal%204.7.x%2F5.x%20migration%20%28conversion%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F08%2Fphp-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html&#038;title=PHP-Nuke%206.0%2F6.5%20to%20Drupal%204.7.x%2F5.x%20migration%20%28conversion%29" data-a2a-url="https://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html" data-a2a-title="PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2006/09/08/php-nuke-6-06-5-to-drupal-4-7-x5-x-migration-conversion.html/feed</wfw:commentRss> <slash:comments>77</slash:comments> </item> </channel> </rss>