Archive

Archive for the ‘Web/Tech’ Category

Snap Preview Anywhere installed

February 8th, 2007 1 comment

This blog has installed with Snap Preview Anywhere for better viewing experience, whenever you move your mouse over a link that links to other website, you can preview the layout of the link you pointing to. Mouse over me to see the effect.

Categories: Web/Tech Tags:

First touch on Windows Vista

January 8th, 2007 No comments

I was assigned a project by company – product stability testing on Microsoft Windows Vista, so I have a chance to use Windows Vista. Although I am not a pioneer that using Windows Vista, but it’s still valuable if I could get a print screen on my first time logged in to Windows Vista. :p

My First Login to Windows Vista

Calling Java from PHP (on Windows XP)

December 28th, 2006 No comments

Here are the steps to run Java classes from PHP

  1. Get JDK installed at your server, you can download either Java SE or Java EE from Download side of Sun website. (download Java SE if you are new, while Java EE for enterprise projects)
  2. Make sure your PHP installation folder has ‘extensions’ folder in it, it’s not available if you installed your PHP with Windows installer. If you don’t have it, download the zip package, get the ‘extensions’ folder out of zip file and paste it into PHP folder.
  3. Now you need to modify the content in php.ini (mostly available in C:\Windows)
    • search for ‘extension=php_java.dll’, uncomment it (by removing the semicolon (;))
    • go to [java] section, add these lines (or replace the commented lines with these lines):

      java.class.path = “c:\php\extensions\php_java.jar; C:\Program Files\Java\jdk1.6.0\bin; C:\Program Files\Java\jdk1.6.0\jre\lib”
      java.home = “C:\Program Files\Java\jdk1.6.0; C:\Program Files\Java\jdk1.6.0\jre\lib”
      java.library = C:\Program Files\Java\jdk1.6.0\jre\bin\server\jvm.dll
      java.library.path = “c:\php\extensions\; C:\Program Files\Java\jdk1.6.0\jre\lib”

    • Save your php.ini, restart your web server.
  4. Now create a PHP file, with the following code:

    $system = new Java(‘java.lang.System’);
    echo ‘Java version installed = ‘ . $system->getProperty(‘java.version’) . “<br />”;
    echo ‘Java vendor = ‘ . $system->getProperty(‘java.vendor’) . “<br />”;
    echo ‘Running on server = ‘ . $system->getProperty(‘os.name’) . “<br />”;

  5. Try to run the PHP script in your browser to test the connectivity.
    Calling Java methods from PHP

However now I still could not have the PHP call my own custom Java class, will update in near future when I got it run ;)

Reference: http://www.php.net/java

My environment: Windows XP with IIS, PHP 4.1.4, JDK 1.6.0

Categories: Web/Tech Tags: ,

New syntax for new MySQL

June 2nd, 2005 No comments

Downloaded new version of MySQL database, version 4.1.12. Just like usual, many new features.

When I execute my old PHP programs (version 4), there is an error occured that I can’t connect to my new MySQL database — old password is not usable.

After searched the net, found few ways to overcome this as shown at http://dev.mysql.com/doc/mysql/en/old-client.html

So I have to reset the password at MySQL Command Line Client so that my old PHP program can connect to the database, and it works.

If using PHP version 5, there is a new extension to connect to MySQL version 4.1 and above, that is mysqli (short of MySQL Improved), documentation at http://php.net/mysqli. So in future we need to work with database using these commands like mysqli_connect(), mysqli_fetch_array()… :)

So should we migrate to PHP5 if using MySQL 4.1 above, or still stick with old MySQL and old PHP4? (since most of the hosting company still having old installation)

Categories: Web/Tech Tags:

Unpleasant experience with VB.Net 2005 Beta

June 1st, 2005 No comments

Been using VB.NET 2005 Beta for 1 week plus, at first was amazed with the speed and intelligent of VB.Net 2005 that can bring, however after some time, some problems rose. At first it can’t open the design view of projects created in version 2002 and converted to version 2005 once. Then I have to redesign the interface of every form then it works again.

Now after a system crash, it can’t even open up any project (vbproj) and solution (sln) files. And one more thing I noticed is, there is a process named ‘mscorsvw.exe’ in my Task Manager consumes average 85 – 99% of CPU usage which is slows down the performance of whole PC.

I solved all the problem uninstalling VB.Net 2005 and .Net Framework v2.0 then everything is back to normal. But the problem is, I had my project developed with version 2005, I can’t reopen those projects under version 2002… O_O

Hope these problems only in Beta version of VB.Net 2005, else it will be big problem for both developer and Microsoft too.

Categories: Web/Tech Tags: