2006/10/24

Add favorite icon for your web page

Simply put your favorite icon (16 x 16 or 32 x 32 ico file named favicon.ico) on the server into the same directory as the web page. Depending on browser and configuration, the favicon.ico is not always rendered, even if it is in one of the above locations, unless the web page explicitly declares its presence. To declare that your web page has an icon, you add the following 2 lines into the <head> section of your page:

<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

2006/10/19

Tricky substitute


$original = "lib p($library)";
$original =~ s/$library/mylibrary/;
print "$original\n";

$original did not change at all, because $library is variable and it is undef in our case, so you cannot find the undef string in $orinial to change it to new string. What we can do is

$original =~ s/\$library/mylibrary/;

2006/10/10

First touch with PHP

I decieded to learn PHP. I installed PHP rpm from my company's repository, and then made it work by editing httpd.conf as below. The process is quite smooth!

vi /etc/httpd/conf/httpd.conf


Find the AddType application section and add the following line;

AddType application/x-httpd-php .php


Restart Appache by

apachectl graceful

2006/10/09

Premature end of script headers

Sigh! Just because I set permission of cgi-bin to 775 instead of 755.