gPHPEdit – the PHP editor I choose

My search for a suitable PHP editor ended up with gPHPEdit.

The search began when jEdit, once an excellent editor I always used, often halted my work. When typing using jEdit, my keyboard was often locked up, so I couldn’t type anything in jEdit although all other system worked normally. This Sun forum let me know that this issue seemed to be something that many people had been waiting to be fixed. (It seemed to be a bug in Java Swing in Linux. Yes, I was using Linux – Fedora 6).

Browsing a bit, I found a list of PHP editors available, some of which had already been familiar to me.

First I tried Eclipse because I wanted to try the most recent version i.e. 3.3.1 (The last time I used Eclipse was about a year ago). I used PDT plugin to PHP-enable the Eclipse. The look and feel and the functionalities looked good. However, when I wanted to edit a PHP file whose extension was .module (I developed a Drupal file), the Eclipse didn’t syntax-highlighted the code although I had followed all instructions to PHP-syntax-highlight non .php files in Eclipse. Moreover, I felt quite heavy launching the Eclipse, which also consumed much of memory and CPU of my 512MB-RAM 1GHz-PIII laptop. I thought it was too big for only a PHP editor.

Then I tried KDevelop, which was actually already in my Fedora 6. It launched much quicker than Eclipse. However, I found the PHP codes were not easy to read, because some guides in the editor looked too distracting to me, and I could not remove the guides to make the codes clearer to read.

Next, I tried Bluefish, which had been in my Fedora 6. The launch was fast, it didn’t consume much memory and CPU of the laptop, and it seemed to be well established. But there were some things that I was not happy with. First, the directories shown nested at the left sidebar was too wide, so that to finally show the directory I was working with, the sidebar had to be widened much. Second, the functions in the list at the sidebar were not those in my PHP code, but function references as those in php.net. I needed to have a list of functions in my code, in which clicking a function in that list could bring me straight to that in the code. Well, I thought, if I got no other alternative I would go with Bluefish anyway.

Feeling a bit exhausted but was still curious, I walked through the list again.

Then I tried gPHPEdit. I picked it because the name gave me a sense that it was a Gnome version of phpEdit, a well known but non-free one. Although gPHPEdit’s last update, i.e. version 0.9.91, was in 2006, I downloaded it anyway. I installed it by compiling the source into my /usr/local directory. The compilation was quick, it seemed lightweight.

I entered “module” into “Recognized PHP file extensions” form. I set “fxd” sized 10 as the font of the editor.

Then guess what? Yes, gPHPEdit gave me what I needed. It provided a clear view of my codes, recognized different PHP file extensions, was quick to launch, didn’t consume much memory and CPU of the old laptop and provided a browser for all functions in my code (which could be turned on/off) in which clicking a function there would direct me straight to that in the code. Moreover, the user interface was just clear and simple to me. All those were just what I needed. In addition, actually it was able to syntax-highlight PHP, CSS, HTML, XML, Python, C/C++, Perl and SQL.

I stopped walking through the list, because all in all gPHPEdit satisfied my needs. It made my PHP coding more enjoyable and so I tended to be more productive compromising my time for searching a suitable PHP editor ๐Ÿ™‚ at least for now. To the developers: “Big thanks”.

Installing Drupal using XAMPP in iMac

I was trying to install Drupal in the iMac, using XAMPP. So I downloaded XAMPP for Mac OS X and installed it. Then I put my Drupal into the /Applications/xampp/xamppfiles/htdocs directory.But what I got in the browser (http://localhost/drupal) were some errors like internal server error, forbidden access and exhausted memory.To fix them, I did as follows:

  • Altered ย the “etc/httpd.conf” ย so that under the document root directory, the “AllowOverride” is set to “All”:
    Options Indexes FollowSymlinks ExecCGI Includes
    AllowOverride All
    Order allow, deny
    Allow from all
  • Make .htaccess readable, by chmod a+r .htaccess
  • In “etc/php.ini”, set memory_limit variable value to 64M (the default was 8M)

Restart the Apache and done, until further problem ๐Ÿ™‚

First review on iMac desktop 20″

This is my first use of iMac aluminum 20″ screen. I “played” with it a bit. This is my opinion.

The look:

  • Pretty
  • Just nice

The hardware

  • Mouse:
    • Need to set the accelerator to maximum, otherwise the journey for my hand is too long for that 20″ screen.
    • Emulated to 2 buttons, need to press Control key and click the mouse together to represent the right button. I like 2-button mouse better.
  • Keyboard: soft enough to type and cute enough to look
  • Monitor: sharp enough and beautiful enough to accommodate my background photo

The software

  • OpenOffice (as I believe in it, and as MS Office is very expensive)
    • To install OpenOffice, first we need to install X11. Insert the provided Mac OS X Install Disc 1, scroll down, choose Optional softwares and tick X11. After installing X11 we can install OpenOffice. I installed the 2.2 one.
    • For printing OpenOffice documents, as my printer is Canon Mp150, first I downloaded the driver from Canon website. However, the printing result of my OpenOffice document was not ok. Then I downloaded and installed gutenprint-5.1.3 so that I had 2 printers on the printer list: MP150 and MP150-gutenprint, but still, the result was not as expected: the black looks rather grey. So my solution was to export my OpenOffice document into PDF, then printed the PDF one using the MP150 one.
    • Another alternative for printing OpenOffice is to use PrintFab, but PrintFab driver is not free and is expensive. I just installed the demo version of it and the printing result seems to be ok, but I will do some more testing later.
    • I also downloaded NeoOffice and used the native driver for mac. The printing result was OK, although a color page using PrintFab looked a bit better.
  • Transfering files using FTP to iMac
    • Need to firstly set System Preferences -> Sharing, and, first I tried “Windows Sharing”, then mapped a drive from my Windows-based laptop to the iMac. The file transferring turned out to be very very slow. I had tried to disable ipv6 as some people had suggested but still got almost similar result: very very slow. Steve and Bill seem to be in cold relationship ๐Ÿ™‚
    • Then I tried “FTP Access” instead of “Windows Sharing”. Then using gFtp I transferred files from my Linux to the iMac, and the speed was fast as expected. Steve and Linus look to be in warm relationship ๐Ÿ™‚
  • Sharing files between users of the iMac
    • Need to put the shared files into /users/shared directory
    • Is there other way, like setting my directory as shared like that in Windows?
  • Setting root password: here contains the info.
  • SecondLife is OK
    • The picture and the sound of my SecondLife were OK
  • For chatting, I downloaded Adium instead of iChat, because I have yahoo, msn, google talk, and it works as expected.
  • Being curious if Ubuntu can be read, I inserted the 7.04 Live CD and hoped that the live CD worked well. But after a while a blank page with command prompt appeared. But Ubuntu in Vmware Fusion is OK.
  • I think Apple interface is a bit confusing for a first-timer. My wife clicked on Adobe Reader icon at the bottom but could not get it shown. She said that she had clicked it several times but the Adobe Reader still didn’t show up. After a while I checked that actually it showed up and its menu was at the top, the Adobe name appeared next to the blue Apple icon in the menu line. The menu of Mac softwares looks the same: at the top, in all applications. I think a first timer will find it too far to notice, especially in a big screen. We get used to have a software popped out in a new window when it’s first opened.
  • iPhoto: just nice
  • iMovie: just wonderful
  • iDVD: coool

To conclude, for now I like the iMac. There are issues that we need to get familiar with but I find them minor compared to the wonderful look, features and functionalities.

I won the world tennis tournament!

..can you believe it? Surely naaaa. It’s a just in a game in my k610i sony mobile phone (which was free by subscribing to Singtel).

However, although it is only a game, it was really challenging to me. I mean it. I am a real tennis player too.

The game consists of 6 tournaments, each of which has 5 matches.

To finally become the champion, I went through really tough matches. The toughest matches were those towards the end i.e. with some eastern Europeans, then with Hennin and finally with Lindsay Davenport. Yeaaah.. they are women tournaments.. you may mourn, but what’s the difference between woman and man in a computer game? Just the dresses, right?

I experienced that, we couldn’t win if we were just a base liner relying on power and angle of our swings. I had to play volley behind the net, sometimes half volley. Also I had to learn the opponent’s body language, if I am not exaggerating, to identify where a return ball would fall.

Moreover, I must never never underestimate the opponent. I might believe that I returned a ball magnificently with my magnificent swing, only to find that the opponent returned it more magnificently.

Now, what can be learned? To me, nothing seems to be more valuable than the spirit that pulls me into doing practice practice practice for the game. This was like a real situation in tennis.

Fedora core 6 in my T23

I almost replaced my FC6 in my T23 because the fedora often hanged up. I have tried removing services, changing kernel versions, uninstalling suspicious packages, but none of them were successful.

Yesterday night I visited this forum and after identifying some of the clues there, now my FC6 seems to be running smoothly. It has been running for more than 8 hours now. Then I shared this in that forum.

The most recent Fedora is FC7 now, but it didn’t install well in my T23. So I am using FC6. I feel like FC6 will be the last Fedora in my T23. When later on someday FC6 is out-of-date, probably I will go with Ubuntu.

I let my eyes be wet writing this post, because I have been loyal to Fedora/Redhat since Redhat 5.1 in 1999!

New Google Map API

Just realised that Google Map has changed its API so that the map in this website is not working.. The revised version will follow..