Document Actions
Open Source
Up one levelDocument Actions
Hosting photos on your Plone site
In my attempt to host pictures on my websites, I tried out multiple things. From evaluating different products (CMFPhotoAlbum, CMFPhoto, ATPhoto) to installing add-on components to modifying source code. I learnt a lot of things during those two days (nights) when I was trying to get it working. I initially thought about just posting a note here, but then I thought I won't do justice to the entire content and let my thoughts trail off here. So now I have decided to write up an article on my experiences and learning so that someone else can benefit from it and not waste so much time in doing the same thing.
In a nutshell, the lessons I learnt are:
- Plone can handle photos natively since v 2.1. Just change the view from standard to thumbnail.
- You need PIL / JPEG support installed on your linux computer / python compilation for it work
- There is bug in the ArcheTypes product in the way plone renders the image using the image_view or atct_album_image viewing method. More on that later.
- If you are stuck anywhere, ask the experts. Open source community is so much helpful and forthcoming, it would be a waste not to ask for help.
- Category(s)
- Technology
- Linux
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/plonephoto/tbping
Firefox hogs memory
Firefox was known to use up more memory than IE, especially if you opened a lot of tabs
at the same time. But suddenly it now acting as a memory hog (at least on my computer) with the memory utilization going as high as 260MB with just 4 tabs open and funny thing is it does not go down if I close all but one tab. It acts like a runaway process and keeps on eating up memory and CPU till the time it becomes unusable. I then have to close the window and open a new session for my PC to be usable again.
Is this a vulnerability in Firefox that could be exploited I know not. I am not an expert in reading code and finding out bugs, but I know enough to identify a problem when I see one. I intend to submit this to the maintainers of Firefox after I do a little bit more research to ascertain that it is not a problem with my computer.
- Category(s)
- Information Security
- Open Source
- Product / Service Reviews
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/firefox/tbping
Fight back against SPAMBots
In the end, I think it was just too easy. I searched over the internet on ways to prevent comment spam. Some of the ways I came across were:
- Change the label of the link from "Comments" to something else. From what I understand, spambots look for specific words and go in and dump spam. The changed label should be inituitive enough to let human readers understand that it is the link to leave comments but hard enough for the bot not to understand.
- Employ Turing test to defeat the bots. Turing test is used on many websites nowadays to distinguish man from machine. But the latest advances in technology can also defeat this approach with OCR technology embedded in it. So can a person determined enough to hire cheap labour to dump spam.
- Do not allow unmoderated comments. Moderate the comments so that the comments do not appear on the website / weblog without your approval. I found a link to this article when I searched for ways to moderate comments. The technique described in the article applies to CoreBlog running on Plone or Zope, but can be extended to almost any software. In fact most of the weblogging sites give options to moderate comments.
In the end, I chose the third option. For the first two, I would have needed to hack and program and spend a lot of time and effort, which I don't have to spare. The third one was quite easy and I could do it within 15-20 minutes while reading the article itself. To moderate the comments in Coreblog2 running on Plone and / or Zope the workflow needs to be modified. Coreblog2 inherits the default workflow from Plone / Zope which allows unmoderated comments to be displayed on the website.
The details of the steps are given in the article so I won't repeat the same here.
- Category(s)
- Technology
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/spambots2/tbping
Broken Website
Don't you just hate it when you break something when trying to carry out some maintenance or clean-up. Two days back I shot myself in the foot and didn't even realise it till today when I came to post on my weblog after six days.
As I have mentioned earlier, I was under attack by Spambots who posting comments with links to porn sites on my weblog. I thought I had taken care of that. But some smart guy outfoxed me by putting a trackback to my website. When I went to delete it, I inadvertently deleted the entire comments folder (place holder) in my weblog (CoreBlog2.0.8b running on Plone 2.5.1). When I posted a new blog entry earlier today, I found out that I could save the entry but it would give me an error that related comments. The error looked like:
- Exception Type
- KeyError
- Exception Value
- 'comments'
I am not a programming guy and I tried very hard to read the code all over the place to understand and find out if I had deleted some key file. I even compared it with my other website and did not find anything wrong there. I spent almost 3 hours trying to find out what was wrong. I even though about raising a ticket with the CoreBlog team and re-installing the CoreBlog software. But that would have been done later today when I reached home. Till that time, my website would be partially inaccessible and I didn't like the sound of it.
So when I again compared my working website and this one, I focused my attention to the weblog object inside the Plone website. I noticed that the comments object is missing from there. I knew that it was a folder, but whenever I tried to add from the ZMI, all I could do was add a weblog entry with the name comments. Although that was fixing the website, it was not the optimum solution that I was looking for. Next thing I did was to check the Portal Types section and saw that the only allowed object type under Coreblog was a new CoreBlog Entry. I added CoreBlogCommentFolder as an allowed type and then came back to the weblog on Plone (it does not work through ZMI though) and added a CoreBlogCommentFolder.
This has fixed my problem and brought my website back up till the time I break it again.
- Category(s)
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/repair_break/tbping
Install Linux or troubleshoot wireless
How easy it is to lose focus of the end objective once you hit a problem? Very very easy if you ask me. As I had posting in my articles over in the Linux category on my attempts to get wireless working on first Ubuntu Desktop and then Fedora Core, I suddenly realised the getting the wireless to work is not what I want. I wanted to test Ubuntu and check it's feasibility in running webserver and support for my current website.
Once I realised that, I stopped my efforts to make wireless work and concentrated on the task at hand. That is to get Ubuntu to run Zope and Plone on my hardware (Dell Latitude D400). Well, Ubuntu desktop was no problem, The installation and setup ran like a charm and the OS was up and running in no time. But I faced major hurdles in getting the Ubuntu Server running. As I have mentioned earlier, the server won't boot up on my laptop and when I tried it using VMWare, it booted up, but the X server was not starting at all. I checked everything I knew and finally gave up.
The Fedora Project has released it's latest offering Fedora Core 6 (FC6) on 24th October. I downloaded it and instead of upgrading my FC4 to FC5, I decided it would be worth my while to upgrade it directly to FC6. Well the installation was easy if lengthy, but a different set of challenges awaited me.
More on that later.
- Category(s)
- Linux
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/linux_wlan/tbping
Re:Install Linux or troubleshoot wireless
"As I have mentioned earlier, the server won't boot up on my laptop and when I tried it using VMWare, it booted up, but the X server was not starting at all."
Ubuntu server does not install X by default..
Ballmer claims that Linux community owes Microsoft
Steve Ballmer speaking at Professional Association for SQL Server (PASS) conference in Seattle yesterday mentioned that Linux users Intellectual Property for Linux and he sees it as a revenue loss or inhibitor for Microsoft. That was one of the reason they signed a deal with Novell, he said. Steve Ballmer was responding to a question in the question and answer session after his keynote speech at the PASS conference.
Quote Steve Ballmer::
"We've had an issue, a problem that we've had to confront, which is because of the way the GPL
(General Public License) works, and because open-source Linux does not come from a company -- Linux comes
from the community -- the fact that that product uses our patented intellectual property is a problem
for our shareholders. We spend $7 billion a year on R&D, our shareholders expect us to protect or license
or get economic benefit from our patented innovations. So how do we somehow get the appropriate economic
return for our patented innovation, and how do we do interoperability. The truth is, because of the complex
licensing around the GPL, we actually didn't want to do one without the other."
I agree completely with Steve. Linux users and the community owes Microsoft tremendously. If it had not been for Microsoft we would never have known how NOT to build an operating system. Had it not been for Microsoft, we would never have realised how bad software looks. Had it not been for Microsoft, we would never have known how to secure our systems. So many things to be grateful for. I can't thank Microsoft enough.
If Microsoft seriously thinks that their claims have merit, then why not file a lawsuit, like SCO did? SCO did it even when they did not have anything to substantiate their claims. And since Microsoft is making these claims in public forums, I would rather that they come up with some solid proof pretty soon or withdraw their claims and issue a public apology to the open source community. As far as I think, Microsoft is trying to justify its deal with Novell by making such absurd claims which is seen by some industry analysts as Microsoft selling out on Linux.
- Category(s)
- Linux
- Windows
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/linux_msip/tbping
How to move your Zope / Plone website to a new server on Linux
Moving your website that runs on Zope / Plone and Linux to a different server is documented on the Plone website. However, the article only gives you the information about the files and folders that stores your website information and customisations. What it does not talk about are the practical issue you will face when carrying out the actual migration. I faced those issues and I spent a long time before I could figure out what was wrong. Maybe it was pretty obvious. But obvious things are what we generally tend to ignore while troubleshooting.
To move my website, I stopped my website processes and copied the Data.fs file and the Products folder to ensure that I have all my products and customisations that I made on my website on the old server to be there on the new server. On the new server, I had Zope and Plone configured and running in its native configuration and first tested it out so that I know the installation is working as expected. (By the by, Zope and Plone included with FC6 does not work. There is a bug in Five product. The version 1.3.7 included doesn't work with the package and you need to upgrade to 1.3.8 or later till 1.4.0. Again that does not solve the issue. It has some other errors on which I didn't spend too much time troubleshooting). Again I stopped Zope on the new server and backed up the Data.fs. file and Products folder on the new box before copying over the production files. (Although you don't have to really backup the files on the new server, its a good idea if you have to roll back for any reason and do some testing).
Note: You don't really have to stop the Zope processes before coying the files to or from the Zope instance, but I would strongly recommend that the process be stopped so that there are no hooks attached to the files while you are copying from or to the Zope instance.
Once I had copied over the new data files, I restarted Zope and tried to access it. Although the process was running, even the Zope welcome page refused to display in the browser. I did a lot of research on some high tech stuff but did not find any solution for my problem. At a sudden inspiration I ran the ls command with the -l switch and saw that the owner user and group for the Data.fs file was root and not plone. I checked in the old server and the owner and group was plone. So then I proceeded to change the owner of the file to plone. I checked the Products folder also and saw that the owner again was root. To change the owner of any file or folder I used the following command.
chown -R plone:plone Products
chown plone:plone Data.fs
The -R switch changes the owner on all folders and files below the top level folder so that I am now able to change the permissions in one shot.
Once that was done, I started my server again and found that it was working. And thought that all was OK. Apparently it was not. Zope started correctly, but when I tried to view my website, I got an error AttributeError: isDefaultPageInFolder. On looking at the log and searching the internet, I found out that the error was coming from global_defines.pt portlet which exists in the Products/CMFPlone/skins/plone_templates folder. Apparently this portlet has been modified in the latest release of Plone from the version that I was running (v2.5) and that was creating problems. I simply copied over the new file on the old one from the earlier backup that I had taken. Secondly the older Five product is not compatible with the new Zope release and you have to use the newer Five. Again I simply copied over the newer Five folder from the backup to the production location (See, I told you it was a good practice to backup before you make changes).
Once this copying was over, everything started working fine immediately. I don't think this is documented anywhere although there are some tickets in some support forums. However, you can spend a lot of time looking for the correct answer. I thought I would add my two cents to the open source community.
Running Zope on Fedora Core 6 helps to Build Your Own Website
Size
2361
-
File type
text/html
How to use re-write module of Apache web server 2.2.3 on FC6 with new or refurbished laptops
Size
6467
-
File type
text/html
- Category(s)
- Linux
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/migrate_site/tbping
Alternative to Internet Explorer - Netscape???
Open question to all:
Can, or better still: Is Netscape still a competitor to Internet explorer in the browser market?
I thought Netscape was a dead product. Mozilla as revived Netscape browsing engine in the form of its Mozilla browser, but Netscape; definitely out. I recently bought a Media Center PC from HP (a m7560n model) which contain Windows XP Media Center edition. It comes preloaded with a lot of software and I think according to instructions from DoJ, it installs some non Microsoft software for browsing and accessing media content.
To be fair, it contains Real Player for media, but for web browsing HP is giving out Netscape. Frankly I think it is doing just lip service to the DoJ ruling. I don't know what other PC manufacturers are doing, but I won't be surprised if it is the same as this. There are much better options out there for browsing than Netscape, like Firefox and Opera. Even if they are just alternatives to Internet Explorer. I don't see IE losing its market domination any time soon, though Firefox is making some inroads in the market share. See related story here. The fact that the PC manufacturers are not keen on providing alternatives is going to stunt the growth of open source and open standards. I know it is very easy and free to just download it from the internet (You can download one from my website if you want), but the point is that average joe user would not want to do it because for him it does not matter. As long as he can get to his favourite websites and email, he is happy.
What can be done to ensure that the hardware manufacturers include some workable alternatives on the bundled PCs? For one thing, the hardware manufacturers would not care what browser is installed as long as their product is being sold. So is it very hard to make them provide Firefox or Opera (Both are free)?
- Category(s)
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/ie_alternative/tbping



It is now happening to me as well. The slowdown is severe when you are using old systems with only 128MB of RAM and slow hard drives. Since Windows shifts memory to the pagefile in the harddrive, moving from one open program to another drags by the minute as the system moves data from ram to hard drive.
that's so true. no offense but i like IE 7 now than firefox for ordinary browsing. i still use firefox to check if my devt site appears correctly & for credit card processing. but my fave is opera. minimize opera and you will notice that the memory usage goes down. both opera and firefox have good plug-ins.