Posted: February 17th, 2010 | Author: paul | Filed under: howto, linux | Tags: database, error, plugin, python, trac | No Comments »
I was trying to fix the error from the title for a few months now.
It was about using tracdownloader plugin from: http://trac-hacks.org/wiki/TracDownloaderPlugin
I have applied the patch it worked, but it stopped.
I have tried almost everything, like other linux distro or python2.5 or python2.6.
My mistake was in trac.db, the default sqlite database of trac.
When I finally decided to manually import the tables from the old database into a new one: downloader_category, downloader_downloaded, downloader_downloaded, downloader_release.
When I had to import downloader_release tables rows I have noticed that the last one from the dump is:
INSERT INTO downloader_file VALUES(19,7,NULL,NULL,NULL,NULL,1261067753.63897,NULL);
I have no ideea how that row was added there, but, after removing that one from the original database tracdownloader start to work again.
So, next time you encounter this error verify you code to be correct, and after that, the database.
HTH
Posted: November 20th, 2009 | Author: paul | Filed under: howto, idiots, linux | Tags: apache, clearsilver, python, trac | No Comments »
If you get the following message:
You're using a plugin which requires the Clearsilver template engine
and Clearsilver is not installed. Either disable that plugin or install Clearsilver.
But, you have compiled and installed latest clearsilver from sources and copied neo_cgi.so to site-packages, and still not working, here is what to you have to do.
For this environment was tested: Linux opensuse 11.1 and centos 5.2, Trac 0.11 with python 2.4 or 2.6, TracDownloader and/or TracWikiToPdfPlugin installed.
Search for clearsilver-*.egg in site-packages and move to another directory.
My clearsilver package name was: clearsilver-0.10.1-py2.6-linux-i686.egg
Restart apache.
Enjoy and say thanks if this solved your problem.
Posted: November 18th, 2009 | Author: paul | Filed under: fun, howto, idiots, linux | Tags: apache, howto, mod_rewrite, rewriterules | No Comments »
Let’s say you have to write RewriteRules for special characters (East Asian Languages in this example, but, it should work for any other).
Link that you want to work: http://domain.tls/리눅스
Destination http://domain.tld/linux
First you must convert/encode (I used http://people.w3.org/rishida/scripts/uniview/conversion.php)
리눅스 is converted to %EB%A6%AC%EB%88%85%EC%8A%A4
You can get this from your access.log file of your server if you access it.
Now, you have to escape the % to match the regexp. Replace % with \x:
\xEB\xA6\xAC\xEB\x88\x85\xEC\x8A\xA4
RewriteEngine On #add it in case it was not added above
ewriteCond %{HTTP_HOST} domain.tld
RewriteRule ^/\xEB\xA6\xAC\xEB\x88\x85\xEC\x8A\xA4$ http://http://domain.tld/linux
Save.
Restart or reload.
mod_rewrite should be loaded.
Test!
Debug: read /var/log/httpd/error.log and access.log (or corresponding error/access log file for the vhost you want the rule to be added.
Posted: November 10th, 2009 | Author: paul | Filed under: howto, linux | Tags: apache, mod_rewrite | No Comments »
I’m not an expert, but here is what you should check.
When you add a domain to be forwarded to a page on the same domain like this:
RewriteCond %{HTTP_HOST} domain-1.tld
RewriteRule ^/$ http://www.domain-1.tld/link/to/the/page/you/want/to/be/forwarded.htm [L]
And, after this you want another section named “section”of this site to be forwarded elsewhere, the other domain like this:
RewriteCond %{HTTP_HOST} domain-1.tld
RewriteRule ^/section$ http://www.domain-2.tld/link/to/a/section.htm
This will not work.
This will not work even if you want to escape the /section by placing it above the rewriterule for /.
This is happening because of the [L] from the first rewrite.
[L] Tells Apache to not process any more RewriteRules if this one was successful.
Now add [L] for /section and you are good to go.
Posted: October 1st, 2009 | Author: paul | Filed under: howto, linux | Tags: howto, ipsec, linux, openswan, sonicwall | No Comments »
Two years ago I wrote an article about connecting openswan to checkpoint.
Here is a new example of connecting openswan to a sonicwall device.
ipsec.conf:
conn sonicwall
type=tunnel
# left=%defaultroute
left=serverip
leftsubnet=10.0.0.0/24
leftid=@macofserver #same on both ends
# leftxauthclient=yes
right=ipfosonicdevice
rightsubnet=192.168.0.0/24
# rightxauthserver=yes
rightid=@macsonicwall #add it as optional on the sonicwall interface
keyingtries=0
pfs=no
aggrmode=yes
auto=add
auth=esp
keyexchange=ike
esp=3des-sha1
ike=3des-sha1
authby=secret
# xauth=yes
ipsec.secrets:
@macofserver @macsonicwall : PSK "sasgSFgdasfg"
Start/Stop/Debugging:
ipsec setup --start
ipsec setup --stop
ipsec setup --restart
#after changes are made apply them
ipsec auto --replace sonicwall
#when debugging, it exists when it works
ipsec whack --name sonicwall --initiate
#after it works
ipsec auto --up sonicwall
Debug for phase1 and 2:
tcpdump -i eth0:0 host ipfosonicdevice
Logs:
tail -f /var/log/secure
References:
http://www.pelagodesign.com/blog/2009/05/18/ubuntu-linux-how-to-setup-a-vpn-connection-to-a-sonicwall-router-using-openswan-and-pre-shared-keys-psk/
http://www.sonicwall.com/downloads/SonicOS_Enhanced_to_Openswan_Using_GroupVPN_with_XAUTH.pdf
Recent Comments